remove all references to runners

This commit is contained in:
Marco Martin 2014-04-16 18:56:22 +02:00
parent 38b513ed3d
commit a2b436aef8
8 changed files with 10 additions and 148 deletions

View File

@ -4,9 +4,7 @@ libplasma is the core of the Plasma desktop. It provides a framework of graphic
widgets (Plasma::Applet) that can be organised into managed groupings
(Plasma::Containment), such as a desktop or panel. It also provides a data
abstraction layer (Plasma::DataEngine) and a corresponding service interaction
layer (Plasma::Service) to make implementing widgets easier and a
system of callouts (Plasma::AbstractRunner) that provide responses to queries,
from running an application to performing a quick calculation.
layer (Plasma::Service) to make implementing widgets easier.
The <a href="http://doc.trolltech.com/latest/graphicsview.html">Qt Graphics View
framework</a> and the <a href="http://api.kde.org/4.x-api/kdelibs-apidocs/">KDE
@ -20,7 +18,7 @@ view, allowing for pluggable widgets to display and interact with the music
collection, such as "current track" and "tag cloud" widgets.
libplasma itself only provides a framework, and the widgets, containments,
data engines and runners are all implemented as plugins. However, the framework
data engines are all implemented as plugins. However, the framework
is designed to make implementing these plugins as easy as possible, including
providing scripting support.
@ -32,7 +30,7 @@ Other important classes are:
- Plasma::Package: provides descriptions of packages containing plugins
for libplasma
- Plasma::Svg and Plasma::FrameSvg: provides themable, cached SVGs
- Plasma::AppletScript, Plasma::DataEngineScript, Plasma::RunnerScript and
- Plasma::AppletScript, Plasma::DataEngineScript and
Plasma::ScriptEngine: provide scripting interfaces for plugins

View File

@ -224,11 +224,9 @@ Q_ENUMS(ImmutabilityType)
enum ComponentType {
AppletComponent = 1, /**< Plasma::Applet based plugins **/
DataEngineComponent = 2, /**< Plasma::DataEngine based plugins **/
RunnerComponent = 4, /**< Plasma::AbstractRunner based plugsin **/
AnimatorComponent = 8, /**< Plasma::Animator based plugins **/
ContainmentComponent = 16,/**< Plasma::Containment based plugins **/
WallpaperComponent = 32, /**< Plasma::Wallpaper based plugins **/
GenericComponent = 64 /** Generic repositories of files, usually they keep QML files and their assets **/
ContainmentComponent = 4,/**< Plasma::Containment based plugins **/
WallpaperComponent = 8, /**< Plasma::Wallpaper based plugins **/
GenericComponent = 16 /** Generic repositories of files, usually they keep QML files and their assets **/
};
Q_ENUMS(ComponentType)
Q_DECLARE_FLAGS(ComponentTypes, ComponentType)

View File

@ -310,13 +310,6 @@ KPluginInfo::List PluginLoader::listEngineInfoByCategory(const QString &category
return KPluginInfo::fromServices(offers);
}
AbstractRunner *PluginLoader::loadRunner(const QString &name)
{
// FIXME: RunnerManager is all wrapped around runner loading; that should be sorted out
// and the actual plugin loading added here
return d->isDefaultLoader ? 0 : internalLoadRunner(name);
}
Service *PluginLoader::loadService(const QString &name, const QVariantList &args, QObject *parent)
{
Service *service = d->isDefaultLoader ? 0 : internalLoadService(name, args, parent);
@ -446,8 +439,6 @@ Package PluginLoader::loadPackage(const QString &packageFormat, const QString &s
structure = new PlasmoidPackage();
} else if (packageFormat.endsWith("/DataEngine")) {
structure = new DataEnginePackage();
} else if (packageFormat.endsWith("/Runner")) {
structure = new RunnerPackage();
} else if (packageFormat.endsWith("/Theme")) {
structure = new ThemePackage();
} else if (packageFormat.endsWith("/ContainmentActions")) {
@ -712,25 +703,6 @@ KPluginInfo::List PluginLoader::listDataEngineInfo(const QString &parentApp)
return list;
}
KPluginInfo::List PluginLoader::listRunnerInfo(const QString &parentApp)
{
KPluginInfo::List list;
if (!d->isDefaultLoader && (parentApp.isEmpty() || parentApp == QCoreApplication::instance()->applicationName())) {
list = internalRunnerInfo();
}
QString constraint;
if (parentApp.isEmpty()) {
constraint.append("not exist [X-KDE-ParentApp]");
} else {
constraint.append("[X-KDE-ParentApp] == '").append(parentApp).append("'");
}
KService::List offers = KServiceTypeTrader::self()->query("Plasma/Runner", constraint);
return list + KPluginInfo::fromServices(offers);
}
KPluginInfo::List PluginLoader::listContainmentActionsInfo(const QString &parentApp)
{
KPluginInfo::List list;
@ -764,12 +736,6 @@ DataEngine *PluginLoader::internalLoadDataEngine(const QString &name)
return 0;
}
AbstractRunner *PluginLoader::internalLoadRunner(const QString &name)
{
Q_UNUSED(name)
return 0;
}
ContainmentActions *PluginLoader::internalLoadContainmentActions(Containment *containment, const QString &name, const QVariantList &args)
{
Q_UNUSED(containment)
@ -804,11 +770,6 @@ KPluginInfo::List PluginLoader::internalDataEngineInfo() const
return KPluginInfo::List();
}
KPluginInfo::List PluginLoader::internalRunnerInfo() const
{
return KPluginInfo::List();
}
KPluginInfo::List PluginLoader::internalServiceInfo() const
{
return KPluginInfo::List();
@ -851,11 +812,6 @@ KPluginInfo::List PluginLoader::standardInternalDataEngineInfo() const
return standardInternalInfo("dataengines");
}
KPluginInfo::List PluginLoader::standardInternalRunnerInfo() const
{
return standardInternalInfo("runners");
}
KPluginInfo::List PluginLoader::standardInternalServiceInfo() const
{
return standardInternalInfo("services");

View File

@ -26,7 +26,6 @@
namespace Plasma {
class AbstractRunner;
class Applet;
class Containment;
class ContainmentActions;
@ -115,13 +114,6 @@ public:
**/
static KPluginInfo::List listEngineInfoByCategory(const QString &category, const QString &parentApp = QString());
/**
* Load a Runner plugin
*
* @return the Runner that was loaded, or 0 on failure.
*/
AbstractRunner *loadRunner(const QString &name);
/**
* Load a Service plugin.
*
@ -292,18 +284,6 @@ public:
**/
KPluginInfo::List listDataEngineInfo(const QString &parentApp = QString());
/**
* Returns a list of all known Runner implementations
*
* @param parentApp the application to filter applets on. Uses the
* X-KDE-ParentApp entry (if any) in the plugin info.
* The default value of QString() will result in a
* list containing only applets not specifically
* registered to an application.
* @return list of AbstractRunners
**/
KPluginInfo::List listRunnerInfo(const QString &parentApp = QString());
/**
* Returns a list of all known ContainmentActions.
*
@ -346,18 +326,6 @@ protected:
virtual Applet *internalLoadApplet(const QString &name, uint appletId = 0,
const QVariantList &args = QVariantList());
/**
* A re-implementable method that allows subclasses to override
* the default behaviour of loadRunner. If the runner requested is not recognized,
* then the implementation should return a NULL pointer. This method is called
* by loadRunner prior to attempting to load a DataEgine using the standard Plasma
* plugin mechanisms.
*
* @param name the name of the engine
* @return the data engine that was loaded, or the NullEngine on failure.
**/
virtual AbstractRunner *internalLoadRunner(const QString &name);
/**
* A re-implementable method that allows subclasses to override
* the default behaviour of loadDataEngine. If the engine requested is not recognized,
@ -446,21 +414,14 @@ protected:
virtual KPluginInfo::List internalDataEngineInfo() const;
/**
* Returns a list of all known Runner implementations
* Returns a list of all known Service implementations
*
* @return list of AbstractRunners info, or an empty list if none
*/
virtual KPluginInfo::List internalRunnerInfo() const;
/**
* Returns a list of all known Runner implementations
*
* @return list of AbstractRunners info, or an empty list if none
* @return list of Service info, or an empty list if none
*/
virtual KPluginInfo::List internalServiceInfo() const;
/**
* Returns a list of all known Runner implementations
* Returns a list of all known ContainmentActions implementations
*
* @return list of ContainmentActions info, or an empty list if none
*/
@ -494,22 +455,11 @@ protected:
*/
KPluginInfo::List standardInternalDataEngineInfo() const;
/**
* Standardized mechanism for providing internal Applets by install .desktop files
* in $APPPDATA/plasma/internal/runners/
*
* For applications that do this, internalRunnerInfo can be implemented as a one-liner
* call to this method.
*
* @return list of applets
*/
KPluginInfo::List standardInternalRunnerInfo() const;
/**
* Standardized mechanism for providing internal Applets by install .desktop files
* in $APPPDATA/plasma/internal/services/
*
* For applications that do this, internalRunnerInfo can be implemented as a one-liner
* For applications that do this, internalServiceInfo can be implemented as a one-liner
* call to this method.
*
* @return list of applets

View File

@ -139,22 +139,6 @@ void DataEnginePackage::initPackage(Package *package)
package->addDirectoryDefinition("translations", "locale", i18n("Translations"));
}
void RunnerPackage::initPackage(Package *package)
{
ChangeableMainScriptPackage::initPackage(package);
package->setServicePrefix("plasma-runner-");
package->setDefaultPackageRoot("plasma/runners/");
package->addDirectoryDefinition("data", "data", i18n("Data Files"));
package->addDirectoryDefinition("scripts", "code", i18n("Executable Scripts"));
QStringList mimetypes;
mimetypes << "text/plain";
package->setMimeTypes("scripts", mimetypes);
package->addDirectoryDefinition("translations", "locale", i18n("Translations"));
}
void ThemePackage::initPackage(Package *package)
{
package->addDirectoryDefinition("dialogs", "dialogs/", i18n("Images for dialogs"));

View File

@ -60,12 +60,6 @@ public:
void initPackage(Package *package);
};
class RunnerPackage : public ChangeableMainScriptPackage
{
public:
void initPackage(Package *package);
};
class ThemePackage : public PackageStructure
{
public:

View File

@ -82,15 +82,7 @@ QStringList knownLanguages(Types::ComponentTypes types)
constraint.append(constraintTemplate.arg("DataEngine"));
}
#if 0
if (types & Types::RunnerComponent) {
if (!constraint.isEmpty()) {
constraint.append(" or ");
}
constraint.append(constraintTemplate.arg("Runner"));
}
#endif
KService::List offers = KServiceTypeTrader::self()->query("Plasma/ScriptEngine", constraint);
//qDebug() << "Applet::knownApplets constraint was '" << constraint
// << "' which got us " << offers.count() << " matches";
@ -128,9 +120,6 @@ KService::List engineOffers(const QString &language, Types::ComponentType type)
case Types::DataEngineComponent:
component = "DataEngine";
break;
case Types::RunnerComponent:
component = "Runner";
break;
default:
return KService::List();
break;
@ -166,11 +155,6 @@ ScriptEngine *loadEngine(const QString &language, Types::ComponentType type, QOb
case Types::DataEngineComponent:
engine = service->createInstance<Plasma::DataEngineScript>(parent, args, &error);
break;
#if 0
case Types::RunnerComponent:
engine = service->createInstance<Plasma::RunnerScript>(parent, args, &error);
break;
#endif
default:
return 0;
break;

View File

@ -33,12 +33,10 @@ class QPainter;
namespace Plasma
{
class AbstractRunner;
class Applet;
class AppletScript;
class DataEngine;
class DataEngineScript;
class RunnerScript;
class ScriptEnginePrivate;
/**