GUI: Fix for loading "oldstyle" project file.
This commit is contained in:
parent
4ccdcf0fc2
commit
ce0f65e761
|
@ -317,6 +317,7 @@ Settings MainWindow::GetCppcheckSettings()
|
|||
if (QFile::exists(projfile))
|
||||
{
|
||||
qDebug() << "Reading project file " << projfile;
|
||||
pfile = new ProjectFile();
|
||||
projectRead = pfile->Read(projfile);
|
||||
}
|
||||
}
|
||||
|
@ -352,6 +353,9 @@ Settings MainWindow::GetCppcheckSettings()
|
|||
}
|
||||
}
|
||||
|
||||
if (!mProject)
|
||||
delete pfile;
|
||||
|
||||
result._debug = false;
|
||||
result._checkCodingStyle = true;
|
||||
result._errorsOnly = false;
|
||||
|
@ -685,7 +689,6 @@ void MainWindow::OpenHtmlHelpContents()
|
|||
|
||||
void MainWindow::OpenProjectFile()
|
||||
{
|
||||
if (mProject != NULL)
|
||||
delete mProject;
|
||||
|
||||
const QString filter = tr("Project files (*.cppcheck);;All files(*.*)");
|
||||
|
@ -747,7 +750,6 @@ void MainWindow::NewProjectFile()
|
|||
const QString filename = inf.fileName();
|
||||
FormatAndSetTitle(tr("Project:") + QString(" ") + filename);
|
||||
|
||||
if (mProject)
|
||||
delete mProject;
|
||||
mProject = new Project(filepath, this);
|
||||
mProject->Create();
|
||||
|
|
Loading…
Reference in New Issue