aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarja Hassinen <marja.hassinen@nokia.com>2010-09-21 09:45:19 +0300
committerMarja Hassinen <marja.hassinen@nokia.com>2010-09-21 09:45:19 +0300
commitdaaf9dd2237ac6c97fad25215df4b35e8fb743de (patch)
treec78ed842b40c4d98f98f090455b39ebf8b251ab5
parentc8d2872cfc102a3a7b22dc3a36fa25964f1a4637 (diff)
Adding a virtual dtor to InfoBackend.
-rw-r--r--libcontextsubscriber/src/infobackend.cpp6
-rw-r--r--libcontextsubscriber/src/infobackend.h3
2 files changed, 8 insertions, 1 deletions
diff --git a/libcontextsubscriber/src/infobackend.cpp b/libcontextsubscriber/src/infobackend.cpp
index 614c90e6..22f039e3 100644
--- a/libcontextsubscriber/src/infobackend.cpp
+++ b/libcontextsubscriber/src/infobackend.cpp
@@ -40,7 +40,7 @@
used by ContextRegistryInfo and ContextPropertyInfo classes.
*/
-InfoBackend* InfoBackend::backendInstance = NULL;
+InfoBackend* InfoBackend::backendInstance = 0;
/// Constructs the object. The \a connectCount is 0 on start.
InfoBackend::InfoBackend(QObject *parent) : QObject(parent)
@@ -48,6 +48,10 @@ InfoBackend::InfoBackend(QObject *parent) : QObject(parent)
connectCount = 0;
}
+InfoBackend::~InfoBackend()
+{
+}
+
/// Returns the actual singleton instance, creates it on first access. Mutex-protected.
/// ContextRegistryInfo and ContextPropertyInfo use this method to access the backend.
/// The optional \a backendName specifies the backend to force, ie: 'xml' or 'cdb'.
diff --git a/libcontextsubscriber/src/infobackend.h b/libcontextsubscriber/src/infobackend.h
index ff37e1e6..3688cea8 100644
--- a/libcontextsubscriber/src/infobackend.h
+++ b/libcontextsubscriber/src/infobackend.h
@@ -60,6 +60,9 @@ public:
/// Returns a list of providers for the given key.
virtual const QList<ContextProviderInfo> providersForKey(QString key) const = 0;
+ /// To make sure the subclasses are freed properly
+ virtual ~InfoBackend();
+
Q_SIGNALS:
/// Emitted when key list changes. ContextRegistryInfo listens on that.
void keysChanged(const QStringList& currentKeys);