Fixed #1187 (GUI: fix project file loading)

This commit is contained in:
Daniel Marjamäki 2010-01-03 08:39:00 +01:00
parent 2a546dc9c0
commit e1ed22aa2b
1 changed files with 5 additions and 2 deletions

View File

@ -294,10 +294,13 @@ Settings MainWindow::GetCppcheckSettings()
// Format project filename (directory name + .cppcheck) and load
// the project file if it is found.
QStringList parts = mCurrentDirectory.split("/");
QString projfile = parts[parts.count() - 1] + ".cppcheck";
QString projfile = mCurrentDirectory + "/" + parts[parts.count() - 1] + ".cppcheck";
bool projectRead = false;
if (QFile::exists(projfile))
projectRead = pfile.Read(mCurrentDirectory + "/" + projfile);
{
qDebug() << "Reading project file " << projfile;
projectRead = pfile.Read(projfile);
}
if (projectRead)
{