tools/assistant/lib/qhelpgenerator.cpp
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
--- a/tools/assistant/lib/qhelpgenerator.cpp	Fri Feb 19 23:40:16 2010 +0200
+++ b/tools/assistant/lib/qhelpgenerator.cpp	Fri Mar 12 15:46:37 2010 +0200
@@ -203,7 +203,7 @@
     addProgress(1.0);
 
     emit statusChanged(tr("Insert custom filters..."));
-    foreach (QHelpDataCustomFilter f, helpData->customFilters()) {
+    foreach (const QHelpDataCustomFilter &f, helpData->customFilters()) {
         if (!registerCustomFilter(f.name, f.filterAttributes, true)) {
             cleanupDB();
             return false;
@@ -367,7 +367,7 @@
             "Name Text, "
             "Value BLOB )");
 
-    foreach (QString q, tables) {
+    foreach (const QString &q, tables) {
         if (!d->query->exec(q)) {
             d->error = tr("Cannot create tables!");
             return false;
@@ -629,7 +629,7 @@
             idsToInsert.removeAll(d->query->value(1).toString());
     }
 
-    foreach (QString id, idsToInsert) {
+    foreach (const QString &id, idsToInsert) {
         d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
         d->query->bindValue(0, id);
         d->query->exec();
@@ -664,7 +664,7 @@
     d->query->bindValue(0, nameId);
     d->query->exec();
 
-    foreach (QString att, filterAttribs) {
+    foreach (const QString &att, filterAttribs) {
         d->query->prepare(QLatin1String("INSERT INTO FilterTable VALUES(?, ?)"));
         d->query->bindValue(0, nameId);
         d->query->bindValue(1, attributeMap[att]);
@@ -687,7 +687,7 @@
         indexId = d->query->value(0).toInt() + 1;
 
     QList<int> filterAtts;
-    foreach (QString filterAtt, filterAttributes) {
+    foreach (const QString &filterAtt, filterAttributes) {
         d->query->prepare(QLatin1String("SELECT Id FROM FilterAttributeTable WHERE Name=?"));
         d->query->bindValue(0, filterAtt);
         d->query->exec();
@@ -704,7 +704,7 @@
 
     int i = 0;
     d->query->exec(QLatin1String("BEGIN"));
-    foreach (QHelpDataIndexItem itm, keywords) {
+    foreach (const QHelpDataIndexItem &itm, keywords) {
         pos = itm.reference.indexOf(QLatin1Char('#'));
         fileName = itm.reference.left(pos);
         if (pos > -1)
@@ -773,7 +773,7 @@
     }
 
     // associate the filter attributes
-    foreach (QString filterAtt, filterAttributes) {
+    foreach (const QString &filterAtt, filterAttributes) {
         d->query->prepare(QLatin1String("INSERT INTO ContentsFilterTable (FilterAttributeId, ContentsId) "
             "SELECT Id, ? FROM FilterAttributeTable WHERE Name=?"));
         d->query->bindValue(0, contentId);
@@ -798,7 +798,7 @@
     while (d->query->next())
         atts.insert(d->query->value(0).toString());
 
-    foreach (QString s, attributes) {
+    foreach (const QString &s, attributes) {
         if (!atts.contains(s)) {
             d->query->prepare(QLatin1String("INSERT INTO FilterAttributeTable VALUES(NULL, ?)"));
             d->query->bindValue(0, s);