start moving this towards sensibility
not much to see yet, but people are looking at this and understandably scratching their head since it's not obvious that a lot of this was sketching versus implementing... well, that's starting to change. svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=576845
This commit is contained in:
parent
f2f121c254
commit
e3fd26c7bd
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) {}
|
||||
|
Loading…
Reference in New Issue
Block a user