GUI: Fix bug that same defines were added to list several times.

This commit is contained in:
Kimmo Varis 2010-08-21 22:59:55 +03:00
parent dbf097326d
commit f2e3090a83
1 changed files with 8 additions and 9 deletions

View File

@ -349,15 +349,14 @@ Settings MainWindow::GetCppcheckSettings()
if (!incdir.endsWith("/")) if (!incdir.endsWith("/"))
incdir += "/"; incdir += "/";
result._includePaths.push_back(incdir.toStdString()); result._includePaths.push_back(incdir.toStdString());
}
QStringList defines = pfile->GetDefines(); QStringList defines = pfile->GetDefines();
QString define; QString define;
foreach(define, defines) foreach(define, defines)
{ {
if (!result.userDefines.empty()) if (!result.userDefines.empty())
result.userDefines += ";"; result.userDefines += ";";
result.userDefines += define.toStdString(); result.userDefines += define.toStdString();
}
} }
} }