diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-04-23 16:20:30 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-06-27 14:35:29 +0200 |
commit | f85292ab206adaa43a9c8e4bfb02249cc4b2ea4d (patch) | |
tree | 30100cdaa64c9caa561e3e44fec31f6bcb5abcc0 /qmake/generators/integrity | |
parent | e0f1de0788954ff78f796a1f732800e762075cb0 (diff) |
const correctness for values() calls
Change-Id: I1476ae8d3fb7364686398c5650729dee94a8e933
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'qmake/generators/integrity')
-rw-r--r-- | qmake/generators/integrity/gbuild.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index 0d9d81c549..a587cf1c8e 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -259,8 +259,8 @@ GBuildMakefileGenerator::write() t << "\t-Iwork\n"; t << "\t-Llib\n"; t << "\t"; - QStringList &l = project->values("QMAKE_CXXFLAGS"); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { + const QStringList &l = project->values("QMAKE_CXXFLAGS"); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if ((*it).startsWith("-")) t << "\n" << "\t" << (*it); else @@ -285,8 +285,8 @@ GBuildMakefileGenerator::write() if (isnativebin && (i == 0)) continue; t << "\t"; - QStringList &l = project->values(src[i]); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { + const QStringList &l = project->values(src[i]); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if ((*it).startsWith("-")) t << "\n" << "\t" << (*it); else @@ -298,8 +298,8 @@ GBuildMakefileGenerator::write() /* first subdirectories/subprojects */ { - QStringList &l = project->values("SUBDIRS"); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { + const QStringList &l = project->values("SUBDIRS"); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { QString gpjname((*it)); /* avoid native tools */ if (nativebins.contains(gpjname.section("_", -1))) @@ -319,9 +319,10 @@ GBuildMakefileGenerator::write() } { - QStringList &l = project->values("RESOURCES"); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { - QString tmpstr((*it).replace(pathtoremove, "")); + const QStringList &l = project->values("RESOURCES"); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { + QString tmpstr(*it); + tmpstr.remove(pathtoremove); t << tmpstr << "\t[Qt Resource]\n"; tmpstr = tmpstr.section(".", -2, -1).section(QDir::separator(), -1); tmpstr.remove(".qrc"); @@ -332,9 +333,10 @@ GBuildMakefileGenerator::write() } } { - QStringList &l = project->values("FORMS"); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { - QString tmpstr((*it).replace(pathtoremove, "")); + const QStringList &l = project->values("FORMS"); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { + QString tmpstr(*it); + tmpstr.remove(pathtoremove); t << tmpstr << "\t[Qt Dialog]\n"; tmpstr = tmpstr.section(".", 0, 0).section(QDir::separator(), -1); tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "ui_"); @@ -347,22 +349,22 @@ GBuildMakefileGenerator::write() /* source files for this project */ QString src[] = { "HEADERS", "SOURCES", QString() }; for (int i = 0; !src[i].isNull(); i++) { - QStringList &l = project->values(src[i]); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { + const QStringList &l = project->values(src[i]); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if ((*it).isEmpty()) continue; /* native tools aren't preprocessed */ if (!isnativebin) t << writeOne((*it), pathtoremove); else - t << (*it).remove(pathtoremove) << "\n"; + t << QString(*it).remove(pathtoremove) << "\n"; } } t << "\n"; { - QStringList &l = project->values("GENERATED_SOURCES"); - for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) { + const QStringList &l = project->values("GENERATED_SOURCES"); + for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { t << "work/" << (*it).section(QDir::separator(), -1) << "\n"; } } |