projects
/
harmattan
/
cameraplus
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e96daba
)
Delete QSparqlConnection when we are not active
author
Mohammed Sameer
<msameer@foolab.org>
Wed, 2 Jan 2013 00:44:58 +0000
(
02:44
+0200)
committer
Mohammed Sameer
<msameer@foolab.org>
Wed, 2 Jan 2013 00:44:58 +0000
(
02:44
+0200)
src/trackerstore.cpp
patch
|
blob
|
history
diff --git
a/src/trackerstore.cpp
b/src/trackerstore.cpp
index
604627d
..
dc27993
100644
(file)
--- a/
src/trackerstore.cpp
+++ b/
src/trackerstore.cpp
@@
-58,7
+58,13
@@
void TrackerStore::setActive(bool active) {
return;
}
- m_connection = new QSparqlConnection("QTRACKER_DIRECT", QSparqlConnectionOptions(), this);
+ if (active) {
+ m_connection = new QSparqlConnection("QTRACKER_DIRECT", QSparqlConnectionOptions(), this);
+ }
+ else {
+ m_connection->deleteLater();
+ m_connection = 0;
+ }
emit activeChanged();
}