load* -> load .. simpler, less verbose API
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779407
This commit is contained in:
parent
fd705735ca
commit
7cf7109266
@ -228,7 +228,7 @@ void AbstractRunner::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractRunner::List AbstractRunner::loadRunners(QObject* parent, const QStringList& whitelist)
|
AbstractRunner::List AbstractRunner::load(QObject* parent, const QStringList& whitelist)
|
||||||
{
|
{
|
||||||
List firstRunners;
|
List firstRunners;
|
||||||
List runners;
|
List runners;
|
||||||
|
@ -69,7 +69,7 @@ class PLASMA_EXPORT AbstractRunner : public QObject
|
|||||||
*
|
*
|
||||||
* @param whitelist An optional whitelist of runners to load
|
* @param whitelist An optional whitelist of runners to load
|
||||||
*/
|
*/
|
||||||
static List loadRunners(QObject* parent, const QStringList& whitelist = QStringList() );
|
static List load(QObject* parent, const QStringList& whitelist = QStringList());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a Runner object. Since AbstractRunner has pure virtuals,
|
* Constructs a Runner object. Since AbstractRunner has pure virtuals,
|
||||||
|
@ -434,7 +434,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, ui
|
|||||||
v->setCursor(Qt::BusyCursor);
|
v->setCursor(Qt::BusyCursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
Applet* applet = Applet::loadApplet(name, id, args);
|
Applet* applet = Applet::load(name, id, args);
|
||||||
if (v) {
|
if (v) {
|
||||||
v->unsetCursor();
|
v->unsetCursor();
|
||||||
}
|
}
|
||||||
|
@ -394,7 +394,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg
|
|||||||
// default to the desktop containment
|
// default to the desktop containment
|
||||||
pluginName = "desktop";
|
pluginName = "desktop";
|
||||||
} else if (pluginName != "null") {
|
} else if (pluginName != "null") {
|
||||||
applet = Applet::loadApplet(pluginName, id, args);
|
applet = Applet::load(pluginName, id, args);
|
||||||
containment = dynamic_cast<Containment*>(applet);
|
containment = dynamic_cast<Containment*>(applet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ DataEngineManager::~DataEngineManager()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
|
Plasma::DataEngine* DataEngineManager::get(const QString& name) const
|
||||||
{
|
{
|
||||||
Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name);
|
Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name);
|
||||||
if (it != d->engines.end()) {
|
if (it != d->engines.end()) {
|
||||||
@ -104,7 +104,7 @@ Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
|
|||||||
return d->nullEngine();
|
return d->nullEngine();
|
||||||
}
|
}
|
||||||
|
|
||||||
Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
|
Plasma::DataEngine* DataEngineManager::load(const QString& name)
|
||||||
{
|
{
|
||||||
Plasma::DataEngine* engine = 0;
|
Plasma::DataEngine* engine = 0;
|
||||||
Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name);
|
Plasma::DataEngine::Dict::const_iterator it = d->engines.find(name);
|
||||||
@ -143,7 +143,7 @@ Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
|
|||||||
return engine;
|
return engine;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataEngineManager::unloadDataEngine(const QString& name)
|
void DataEngineManager::unload(const QString& name)
|
||||||
{
|
{
|
||||||
Plasma::DataEngine::Dict::iterator it = d->engines.find(name);
|
Plasma::DataEngine::Dict::iterator it = d->engines.find(name);
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class PLASMA_EXPORT DataEngineManager: public QObject
|
|||||||
*
|
*
|
||||||
* @param name the name of the engine
|
* @param name the name of the engine
|
||||||
*/
|
*/
|
||||||
Plasma::DataEngine* dataEngine(const QString& name) const;
|
Plasma::DataEngine* get(const QString& name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads a data engine and increases the reference count on it.
|
* Loads a data engine and increases the reference count on it.
|
||||||
@ -66,13 +66,13 @@ class PLASMA_EXPORT DataEngineManager: public QObject
|
|||||||
* @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.
|
||||||
*/
|
*/
|
||||||
Plasma::DataEngine* loadDataEngine(const QString& name);
|
Plasma::DataEngine* load(const QString& name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Decreases the reference count on the engine. If the count reaches
|
* Decreases the reference count on the engine. If the count reaches
|
||||||
* zero, then the engine is deleted to save resources.
|
* zero, then the engine is deleted to save resources.
|
||||||
*/
|
*/
|
||||||
void unloadDataEngine(const QString& name);
|
void unload(const QString& name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a listing of all known engines by name
|
* Returns a listing of all known engines by name
|
||||||
|
Loading…
Reference in New Issue
Block a user