* loadEngine -> loadDataEngine

* ws clean up
* add to the apidox a bit
* add a ctor

svn path=/trunk/KDE/kdelibs/; revision=1150391
This commit is contained in:
Aaron J. Seigo 2010-07-15 21:11:20 +00:00
parent e00a7b2422
commit fd71ff404b
3 changed files with 20 additions and 15 deletions

View File

@ -117,7 +117,7 @@ Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
// Ask the application's plugin loader, if present // Ask the application's plugin loader, if present
if (PluginLoader::pluginLoader()) { if (PluginLoader::pluginLoader()) {
engine = PluginLoader::pluginLoader()->loadEngine(name); engine = PluginLoader::pluginLoader()->loadDataEngine(name);
if (engine) { if (engine) {
return engine; return engine;
} }

View File

@ -23,15 +23,16 @@
namespace Plasma { namespace Plasma {
class PluginLoaderPrivate
{
// Placeholder for BC
};
static PluginLoader* s_pluginLoader = 0; static PluginLoader* s_pluginLoader = 0;
PluginLoader::PluginLoader()
: d(0)
{
}
PluginLoader::~PluginLoader() PluginLoader::~PluginLoader()
{ {
//delete d;
} }
void PluginLoader::setPluginLoader(PluginLoader* loader) void PluginLoader::setPluginLoader(PluginLoader* loader)
@ -52,7 +53,7 @@ Applet* PluginLoader::loadApplet(const QString &name, uint appletId, const QVari
{ Q_UNUSED(name) Q_UNUSED(appletId) Q_UNUSED(args) return 0; { Q_UNUSED(name) Q_UNUSED(appletId) Q_UNUSED(args) return 0;
} }
DataEngine* PluginLoader::loadEngine(const QString &name) DataEngine* PluginLoader::loadDataEngine(const QString &name)
{ Q_UNUSED(name) return 0; { Q_UNUSED(name) return 0;
} }

View File

@ -32,7 +32,9 @@ class PluginLoaderPrivate;
/** /**
* This is an abstract base class which defines an interface to which Plasma's * This is an abstract base class which defines an interface to which Plasma's
* Applet Loading logic can communicate with a parent application. * Applet Loading logic can communicate with a parent application. The plugin loader
* must be set before any plugins are loaded, otherwise (for safety reasons), the
* default PluginLoader implementation will be used.
* *
* @author Ryan Rix <ry@n.rix.si> * @author Ryan Rix <ry@n.rix.si>
* @since 4.6 * @since 4.6
@ -40,6 +42,8 @@ class PluginLoaderPrivate;
class PLASMA_EXPORT PluginLoader class PLASMA_EXPORT PluginLoader
{ {
public: public:
PluginLoader();
virtual ~PluginLoader(); virtual ~PluginLoader();
/** /**
@ -60,7 +64,7 @@ public:
* @param name the name of the engine * @param name the name of the engine
* @return the data engine that was loaded, or the NullEngine on failure. * @return the data engine that was loaded, or the NullEngine on failure.
**/ **/
virtual DataEngine* loadEngine(const QString &name); virtual DataEngine* loadDataEngine(const QString &name);
/** /**
* Load an external Service and supply it to Plasma. * Load an external Service and supply it to Plasma.
@ -87,7 +91,7 @@ public:
static PluginLoader* pluginLoader(); static PluginLoader* pluginLoader();
private: private:
PluginLoaderPrivate* d; PluginLoaderPrivate * const d;
}; };
} }