tools/assistant/lib/qhelpcollectionhandler.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -252,7 +252,7 @@
         "Key TEXT PRIMARY KEY, "
         "Value BLOB )");
 
-    foreach (QString q, tables) {
+    foreach (const QString &q, tables) {
         if (!query->exec(q))
             return false;
     }
@@ -323,7 +323,7 @@
             idsToInsert.removeAll(m_query.value(1).toString());
     }
 
-    foreach (QString id, idsToInsert) {
+    foreach (const QString &id, idsToInsert) {
         m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
         m_query.bindValue(0, id);
         m_query.exec();
@@ -346,7 +346,7 @@
     m_query.bindValue(0, nameId);
     m_query.exec();
 
-    foreach (QString att, attributes) {
+    foreach (const QString &att, attributes) {
         m_query.prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)"));
         m_query.bindValue(0, nameId);
         m_query.bindValue(1, attributeMap[att]);
@@ -400,7 +400,7 @@
         return false;
 
     addFilterAttributes(reader.filterAttributes());
-    foreach (QString filterName, reader.customFilters())
+    foreach (const QString &filterName, reader.customFilters())
         addCustomFilter(filterName, reader.filterAttributes(filterName));
 
     optimizeDatabase(fileName);
@@ -499,7 +499,7 @@
     while (m_query.next())
         atts.insert(m_query.value(0).toString());
 
-    foreach (QString s, attributes) {
+    foreach (const QString &s, attributes) {
         if (!atts.contains(s)) {
             m_query.prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
             m_query.bindValue(0, s);