GUI: Remove code for automatic deallocated classes.
Project file code still read the list of automatically deallocated classes from project file. That feature hasn't been supported in few last releases.
This commit is contained in:
parent
9296c717f3
commit
5aadf242d7
|
@ -3,11 +3,6 @@
|
|||
<!-- cppcheck project file -->
|
||||
|
||||
<project version="1">
|
||||
<autodealloc>
|
||||
<class name="AboutDialog"/>
|
||||
<class name="FileViewDialog"/>
|
||||
<class name="ThreadHandler"/>
|
||||
</autodealloc>
|
||||
<includedir>
|
||||
<dir name="../lib" />
|
||||
</includedir>
|
||||
|
|
|
@ -304,14 +304,6 @@ Settings MainWindow::GetCppcheckSettings()
|
|||
|
||||
if (projectRead)
|
||||
{
|
||||
QStringList classes = pfile.GetDeAllocatedClasses();
|
||||
QString classname;
|
||||
foreach(classname, classes)
|
||||
{
|
||||
// the auto-dealloc is deprecated
|
||||
//result.addAutoAllocClass(classname.toStdString());
|
||||
}
|
||||
|
||||
QStringList dirs = pfile.GetIncludeDirs();
|
||||
QString dir;
|
||||
foreach(dir, dirs)
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include "projectfile.h"
|
||||
|
||||
static const char ProjectElementName[] = "project";
|
||||
static const char AllocElementName[] = "autodealloc";
|
||||
static const char ClassElementName[] = "class";
|
||||
static const char ClassNameAttrib[] = "name";
|
||||
static const char IncludDirElementName[] = "includedir";
|
||||
static const char DirElementName[] = "dir";
|
||||
static const char DirNameAttrib[] = "name";
|
||||
|
@ -63,13 +60,11 @@ bool ProjectFile::Read(const QString &filename)
|
|||
if (xmlReader.name() == ProjectElementName)
|
||||
insideProject = true;
|
||||
|
||||
// Find allocelement from inside project element
|
||||
if (insideProject && xmlReader.name() == AllocElementName)
|
||||
ReadAutoAllocClasses(xmlReader);
|
||||
|
||||
// Find include directory from inside project element
|
||||
if (insideProject && xmlReader.name() == IncludDirElementName)
|
||||
ReadIncludeDirs(xmlReader);
|
||||
|
||||
// Find preprocessor define from inside project element
|
||||
if (insideProject && xmlReader.name() == DefinesElementName)
|
||||
ReadDefines(xmlReader);
|
||||
|
||||
|
@ -98,11 +93,6 @@ bool ProjectFile::Read(const QString &filename)
|
|||
return true;
|
||||
}
|
||||
|
||||
QStringList ProjectFile::GetDeAllocatedClasses() const
|
||||
{
|
||||
return mDeAllocatedClasses;
|
||||
}
|
||||
|
||||
QStringList ProjectFile::GetIncludeDirs() const
|
||||
{
|
||||
return mIncludeDirs;
|
||||
|
@ -113,48 +103,6 @@ QStringList ProjectFile::GetDefines() const
|
|||
return mDefines;
|
||||
}
|
||||
|
||||
void ProjectFile::ReadAutoAllocClasses(QXmlStreamReader &reader)
|
||||
{
|
||||
QXmlStreamReader::TokenType type;
|
||||
bool allRead = false;
|
||||
do
|
||||
{
|
||||
type = reader.readNext();
|
||||
switch (type)
|
||||
{
|
||||
case QXmlStreamReader::StartElement:
|
||||
|
||||
// Read class-elements
|
||||
if (reader.name().toString() == ClassElementName)
|
||||
{
|
||||
QXmlStreamAttributes attribs = reader.attributes();
|
||||
QString name = attribs.value("", ClassNameAttrib).toString();
|
||||
if (!name.isEmpty())
|
||||
mDeAllocatedClasses << name;
|
||||
}
|
||||
break;
|
||||
|
||||
case QXmlStreamReader::EndElement:
|
||||
if (reader.name().toString() == AllocElementName)
|
||||
allRead = true;
|
||||
break;
|
||||
|
||||
// Not handled
|
||||
case QXmlStreamReader::NoToken:
|
||||
case QXmlStreamReader::Invalid:
|
||||
case QXmlStreamReader::StartDocument:
|
||||
case QXmlStreamReader::EndDocument:
|
||||
case QXmlStreamReader::Characters:
|
||||
case QXmlStreamReader::Comment:
|
||||
case QXmlStreamReader::DTD:
|
||||
case QXmlStreamReader::EntityReference:
|
||||
case QXmlStreamReader::ProcessingInstruction:
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (!allRead);
|
||||
}
|
||||
|
||||
void ProjectFile::ReadIncludeDirs(QXmlStreamReader &reader)
|
||||
{
|
||||
QXmlStreamReader::TokenType type;
|
||||
|
|
|
@ -47,12 +47,6 @@ public:
|
|||
*/
|
||||
bool Read(const QString &filename = QString());
|
||||
|
||||
/**
|
||||
* @brief Get list of automatically deallocated classes.
|
||||
* @return list of classes.
|
||||
*/
|
||||
QStringList GetDeAllocatedClasses() const;
|
||||
|
||||
/**
|
||||
* @brief Get list of include directories.
|
||||
* @return list of directories.
|
||||
|
@ -66,12 +60,6 @@ public:
|
|||
QStringList GetDefines() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* @brief Read list of automatically deallocated classes from XML.
|
||||
* @param reader XML stream reader.
|
||||
*/
|
||||
void ReadAutoAllocClasses(QXmlStreamReader &reader);
|
||||
|
||||
/**
|
||||
* @brief Read list of include directories from XML.
|
||||
* @param reader XML stream reader.
|
||||
|
@ -91,11 +79,6 @@ private:
|
|||
*/
|
||||
QString mFilename;
|
||||
|
||||
/**
|
||||
* @brief List of automatically deallocated classes.
|
||||
*/
|
||||
QStringList mDeAllocatedClasses;
|
||||
|
||||
/**
|
||||
* @brief List of include directories used to search include files.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue