[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra/kexi-frameworks7-staniek] kexi/core: KexiProject: fix retrieving list of items (broken dur
From:       Jaroslaw Staniek <staniek () kde ! org>
Date:       2015-06-30 20:24:24
Message-ID: E1ZA24u-0006Ps-Gm () scm ! kde ! org
[Download RAW message or body]

Git commit 38ce9eb3936cdac07cc0cbe44fab4c228484f2a9 by Jaroslaw Staniek.
Committed on 30/06/2015 at 20:16.
Pushed by staniek into branch 'kexi-frameworks7-staniek'.

KexiProject: fix retrieving list of items (broken during the port)

M  +4    -4    kexi/core/kexiproject.cpp

http://commits.kde.org/calligra/38ce9eb3936cdac07cc0cbe44fab4c228484f2a9

diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp
index c56801e..5dc407f 100644
--- a/kexi/core/kexiproject.cpp
+++ b/kexi/core/kexiproject.cpp
@@ -709,16 +709,16 @@ bool KexiProject::retrieveItems()
         return 0;
 
     int recentTypeId = -1000;
+    QString pluginId;
     KexiPart::ItemDict *dict = 0;
     for (cursor->moveFirst(); !cursor->eof(); cursor->moveNext()) {
         bool ok;
-        int typeId = cursor->value(3).toInt(&ok);
+        const int typeId = cursor->value(3).toInt(&ok);
         if (!ok || typeId <= 0) {
             qWarning() << "object of unknown type id" << cursor->value(3) << "id=" << cursor->value(0)
                        << "name=" <<  cursor->value(1);
             continue;
         }
-        QString pluginId;
         if (recentTypeId == typeId) {
             if (pluginId.isEmpty()) // still the same unknown plugin ID
                 continue;
@@ -732,8 +732,8 @@ bool KexiProject::retrieveItems()
             dict = new KexiPart::ItemDict();
             d->itemDicts.insert(pluginId, dict);
         }
-        int ident = cursor->value(0).toInt(&ok);
-        QString objName(cursor->value(1).toString());
+        const int ident = cursor->value(0).toInt(&ok);
+        const QString objName(cursor->value(1).toString());
         if (ok && (ident > 0) && !d->connection->isInternalTableSchema(objName)
                 && KDb::isIdentifier(objName))
         {

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic