diff --git a/applet.cpp b/applet.cpp index 32a48ed56..340d2c1ed 100644 --- a/applet.cpp +++ b/applet.cpp @@ -47,7 +47,7 @@ class Applet::Private { foreach (const QString& engine, loadedEngines) { - Interface::interface()->unloadDataEngine(engine); + Interface::self()->unloadDataEngine(engine); } } @@ -88,13 +88,11 @@ KSharedConfig::Ptr Applet::appletConfig() const return d->appletConfig; } -KSharedConfig::Ptr Applet::globalAppletConfig() const +KSharedConfig::Ptr Applet::AppletConfig() const { if (!d->globalConfig) { - QString file = locateLocal("config", - "plasma_" + globalName() + "rc", - true); + QString file = locateLocal("config", "plasma_" + globalName() + "rc"); d->globalConfig = KSharedConfig::openConfig(file, false, true); } diff --git a/dataengine.h b/dataengine.h index fe50a0eda..4dd09ad81 100644 --- a/dataengine.h +++ b/dataengine.h @@ -67,12 +67,11 @@ class DataEngine : public QObject void ref(); void deref(); + bool used(); protected: virtual void init(); virtual void cleanup(); - virtual DataEngine* engine() = 0; - virtual private: QAtomic ref; @@ -89,5 +88,3 @@ class DataEngine : public QObject #endif // multiple inclusion guard - -#endif diff --git a/interface.h b/interface.h index 993a8d0f1..0da758260 100644 --- a/interface.h +++ b/interface.h @@ -25,10 +25,10 @@ namespace Plasma class Interface { public: - static Interface* interface() { return m_interface; } + static Interface* self() { return m_interface; } virtual bool loadDataEngine(const QString& name) = 0; - virtual bool unloadDataEngine(const QString& name) = 0; + virtual void unloadDataEngine(const QString& name) = 0; protected: Interface() : m_interface(0) {}