src/tools/uic/cpp/cppwriteinitialization.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
child 7 3f74d0d4af4c
--- a/src/tools/uic/cpp/cppwriteinitialization.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/src/tools/uic/cpp/cppwriteinitialization.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -2787,8 +2787,8 @@
         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 @@
 
     outputStream << "#if";
     bool doOr = false;
-    foreach (QString str, map.keys()) {
+    foreach (const QString &str, map.keys()) {
         if (doOr)
             outputStream << " ||";
         outputStream << " !defined(" << str << ')';