summaryrefslogtreecommitdiffstats
path: root/src/tools/uic
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-01 09:28:00 (GMT)
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-02-01 09:28:00 (GMT)
commita788f7e3a04ec741d59ef458a40e39d918dc1df0 (patch)
treed604e4f206473b125c335b61487d833fd0926af4 /src/tools/uic
parentf3da2f414f9fce9aa014da79be9f50c075c60936 (diff)
downloadQt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.zip
Qt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.tar.gz
Qt-a788f7e3a04ec741d59ef458a40e39d918dc1df0.tar.bz2
Designer/uic/related examples: Fix source code scanning issues II.
Fix spelling errors, foreach()/QString usage, explicit constructors. Reviewed-By: Joerg Bornemann <joerg.bornemann@trolltech.com>
Diffstat (limited to 'src/tools/uic')
-rw-r--r--src/tools/uic/cpp/cppwriteinitialization.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp
index d9aff1b..8099ffa 100644
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp
@@ -2787,8 +2787,8 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS
return;
QMap<QString, bool> map; // bool is dummy. The idea is to sort that (always generate in the same order) by putting a set into a map
- foreach (QString str, directives)
- map[str] = true;
+ foreach (const QString &str, directives)
+ map.insert(str, true);
if (map.size() == 1) {
outputStream << "#ifndef " << map.constBegin().key() << endl;
@@ -2797,7 +2797,7 @@ static void generateMultiDirectiveBegin(QTextStream &outputStream, const QSet<QS
outputStream << "#if";
bool doOr = false;
- foreach (QString str, map.keys()) {
+ foreach (const QString &str, map.keys()) {
if (doOr)
outputStream << " ||";
outputStream << " !defined(" << str << ')';