GUI: use range for instead of foreach
This commit is contained in:
parent
508fa6284c
commit
0c66453c21
|
@ -99,10 +99,10 @@ unsigned CheckStatistics::getCount(const QString &tool, ShowTypes::ShowType type
|
|||
QStringList CheckStatistics::getTools() const
|
||||
{
|
||||
QSet<QString> ret;
|
||||
foreach (QString tool, mStyle.keys()) ret.insert(tool);
|
||||
foreach (QString tool, mWarning.keys()) ret.insert(tool);
|
||||
foreach (QString tool, mPerformance.keys()) ret.insert(tool);
|
||||
foreach (QString tool, mPortability.keys()) ret.insert(tool);
|
||||
foreach (QString tool, mError.keys()) ret.insert(tool);
|
||||
for (const QString& tool: mStyle.keys()) ret.insert(tool);
|
||||
for (const QString& tool: mWarning.keys()) ret.insert(tool);
|
||||
for (const QString& tool: mPerformance.keys()) ret.insert(tool);
|
||||
for (const QString& tool: mPortability.keys()) ret.insert(tool);
|
||||
for (const QString& tool: mError.keys()) ret.insert(tool);
|
||||
return QStringList(ret.values());
|
||||
}
|
||||
|
|
|
@ -515,7 +515,7 @@ void MainWindow::doAnalyzeFiles(const QStringList &files, const bool checkLibrar
|
|||
if (!checkSettings.buildDir.empty()) {
|
||||
checkSettings.loadSummaries();
|
||||
std::list<std::string> sourcefiles;
|
||||
foreach (QString s, fileNames)
|
||||
for (const QString& s: fileNames)
|
||||
sourcefiles.push_back(s.toStdString());
|
||||
AnalyzerInformation::writeFilesTxt(checkSettings.buildDir, sourcefiles, checkSettings.userDefines, checkSettings.project.fileSettings);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue