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

List:       kde-commits
Subject:    branches/KDE/4.6/kdelibs/plasma/private
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-01-06 21:47:08
Message-ID: 20110106214708.88EBDAC8B1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1212411 by mart:

backport database close when the job terminates


 M  +3 -4      storage.cpp  


--- branches/KDE/4.6/kdelibs/plasma/private/storage.cpp #1212410:1212411
@@ -85,7 +85,6 @@
       query.bindValue(":datavalue", params["data"]);
       const bool success = query.exec();
       setResult(success);
-      return;
 
     } else if (operationName() == "retrieve") {
         QSqlQuery query(m_db);
@@ -124,9 +123,6 @@
             }
 
             setResult(h);
-            return;
-        } else {
-            return;
         }
 
     } else if (operationName() == "delete") {
@@ -165,6 +161,9 @@
     } else {
         setError(true);
     }
+    //TODO: use a single shared db per thread
+    m_db.close();
+    QSqlDatabase::removeDatabase(m_db.connectionName());
 }
 
 Plasma::ServiceJob* Storage::createJob(const QString &operation, QMap<QString, QVariant> &parameters)
[prev in list] [next in list] [prev in thread] [next in thread] 

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