Commit 934bccbc authored by Friedemann Kleint's avatar Friedemann Kleint

Fix Krazy-warnings in CppTools.

- values or keys iteration
- non-const ref iterator

Change-Id: I6bb58793b3155243e0fbfaf33ee43ce60edea8d1
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@digia.com>
parent a2f3bcc9
......@@ -65,7 +65,7 @@ QFuture<CppHighlightingSupport::Use> CppHighlightingSupportInternal::highlightin
}
//Get macro uses
foreach (Document::MacroUse macro, doc->macroUses()) {
foreach (const Document::MacroUse &macro, doc->macroUses()) {
const QString name = QString::fromUtf8(macro.macro().name());
//Filter out QtKeywords
......
......@@ -813,7 +813,7 @@ void CppModelManager::dumpModelManagerConfiguration()
{
// Tons of debug output...
qDebug()<<"========= CppModelManager::dumpModelManagerConfiguration ======";
foreach (const ProjectInfo &pinfo, m_projects.values()) {
foreach (const ProjectInfo &pinfo, m_projects) {
qDebug()<<" for project:"<< pinfo.project().data()->document()->fileName();
foreach (const ProjectPart::Ptr &part, pinfo.projectParts()) {
qDebug() << "=== part ===";
......@@ -958,7 +958,7 @@ void CppModelManager::updateProjectInfo(const ProjectInfo &pinfo)
m_srcToProjectPart.clear();
foreach (const ProjectInfo &projectInfo, m_projects.values()) {
foreach (const ProjectInfo &projectInfo, m_projects) {
foreach (const ProjectPart::Ptr &projectPart, projectInfo.projectParts()) {
foreach (const QString &sourceFile, projectPart->sourceFiles)
m_srcToProjectPart[sourceFile].append(projectPart);
......
......@@ -329,7 +329,7 @@ QString correspondingHeaderOrSource(const QString &fileName, bool *wasHeader)
foreach (const QString &candidateFileName, candidateFileNames) {
const QStringList projectFiles = findFilesInProject(candidateFileName, project);
// Find the file having the most common path with fileName
foreach (const QString projectFile, projectFiles) {
foreach (const QString &projectFile, projectFiles) {
int value = commonStringLength(fileName, projectFile);
if (value > compareValue) {
compareValue = value;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment