From daaf9dd2237ac6c97fad25215df4b35e8fb743de Mon Sep 17 00:00:00 2001 From: Marja Hassinen Date: Tue, 21 Sep 2010 09:45:19 +0300 Subject: Adding a virtual dtor to InfoBackend. --- libcontextsubscriber/src/infobackend.cpp | 6 +++++- libcontextsubscriber/src/infobackend.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 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); -- cgit v1.2.3