From 9165b11235a859a3f375ef5b9a824693aefc6501 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Tue, 29 Apr 2008 16:24:14 +0000 Subject: [PATCH] at tokamak i said i regretted using the term "Language" to describe what is really "API". i meant it. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802486 --- abstractrunner.cpp | 14 +++++++------- applet.cpp | 14 +++++++------- dataengine.cpp | 10 +++++----- dataenginemanager.cpp | 4 ++-- packagemetadata.cpp | 12 ++++++------ packagemetadata.h | 4 ++-- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/abstractrunner.cpp b/abstractrunner.cpp index 170935de1..7dd270da7 100644 --- a/abstractrunner.cpp +++ b/abstractrunner.cpp @@ -48,17 +48,17 @@ public: package(0) { if (runnerDescription.isValid()) { - const QString language = runnerDescription.property("X-Plasma-Language").toString(); - if (!language.isEmpty()) { + const QString api = runnerDescription.property("X-Plasma-API").toString(); + if (!api.isEmpty()) { const QString path = KStandardDirs::locate("data", "plasma/runners/" + runnerDescription.pluginName() + "/"); - PackageStructure::Ptr structure = Plasma::packageStructure(language, Plasma::RunnerComponent); + PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::RunnerComponent); structure->setPath(path); package = new Package(path, structure); - script = Plasma::loadScriptEngine(language, runner); + script = Plasma::loadScriptEngine(api, runner); if (!script) { - kDebug() << "Could not create a" << language << "ScriptEngine for the" + kDebug() << "Could not create a" << api << "ScriptEngine for the" << runnerDescription.name() << "Runner."; delete package; package = 0; @@ -254,10 +254,10 @@ AbstractRunner::List AbstractRunner::loadAll(QObject* parent, const QStringList& QString error; foreach (const KService::Ptr &service, offers) { if (whitelist.empty() || whitelist.contains(service->name())) { - QString language = service->property("X-Plasma-Language").toString(); + QString api = service->property("X-Plasma-API").toString(); AbstractRunner* runner = 0; - if (language.isEmpty()) { + if (api.isEmpty()) { QVariantList args; args << service->storageId(); runner = service->createInstance(parent, args, &error); diff --git a/applet.cpp b/applet.cpp index 5d54b28a9..27141f1c0 100644 --- a/applet.cpp +++ b/applet.cpp @@ -154,10 +154,10 @@ public: return; } - QString language = appletDescription.property("X-Plasma-Language").toString(); + QString api = appletDescription.property("X-Plasma-API").toString(); // we have a scripted plasmoid - if (!language.isEmpty()) { + if (!api.isEmpty()) { // find where the Package is QString path = KStandardDirs::locate("data", "plasma/plasmoids/" + appletDescription.pluginName() + @@ -169,7 +169,7 @@ public: } else { // create the package and see if we have something real //kDebug() << "trying for" << path; - PackageStructure::Ptr structure = Plasma::packageStructure(language, Plasma::AppletComponent); + PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::AppletComponent); structure->setPath(path); package = new Package(path, structure); @@ -178,12 +178,12 @@ public: // it will be parented to this applet and so will get // deleted when the applet does - script = Plasma::loadScriptEngine(language, q); + script = Plasma::loadScriptEngine(api, q); if (!script) { delete package; package = 0; q->setFailedToLaunch(true, i18n("Could not create a %1 ScriptEngine for the %2 widget.", - language, appletDescription.name())); + api, appletDescription.name())); } } else { q->setFailedToLaunch(true, i18n("Could not open the %1 package required for the %2 widget.", @@ -1341,8 +1341,8 @@ Applet* Applet::load(const QString& appletName, uint appletId, const QVariantLis appletId = ++Private::s_maxAppletId; } - if (!offer->property("X-Plasma-Language").toString().isEmpty()) { - kDebug() << "we have a script in the language of" << offer->property("X-Plasma-Language").toString(); + if (!offer->property("X-Plasma-API").toString().isEmpty()) { + kDebug() << "we have a script using the" << offer->property("X-Plasma-API").toString() << "API"; if (isContainment) { return new Containment(0, offer->storageId(), appletId); } diff --git a/dataengine.cpp b/dataengine.cpp index f3abf8eb7..53ae50016 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -417,18 +417,18 @@ DataEngine::Private::Private(DataEngine* e, KService::Ptr service) KPluginInfo dataEngineDescription(service); if (dataEngineDescription.isValid()) { - QString language = dataEngineDescription.property("X-Plasma-Language").toString(); + QString api = dataEngineDescription.property("X-Plasma-API").toString(); - if (!language.isEmpty()) { + if (!api.isEmpty()) { const QString path = KStandardDirs::locate("data", "plasma/engines/" + dataEngineDescription.pluginName() + "/"); - PackageStructure::Ptr structure = Plasma::packageStructure(language, Plasma::RunnerComponent); + PackageStructure::Ptr structure = Plasma::packageStructure(api, Plasma::RunnerComponent); structure->setPath(path); package = new Package(path, structure); - script = Plasma::loadScriptEngine(language, q); + script = Plasma::loadScriptEngine(api, q); if (!script) { - kDebug() << "Could not create a" << language << "ScriptEngine for the" + kDebug() << "Could not create a" << api << "ScriptEngine for the" << dataEngineDescription.name() << "DataEngine."; delete package; package = 0; diff --git a/dataenginemanager.cpp b/dataenginemanager.cpp index 69ca04571..e8b156971 100644 --- a/dataenginemanager.cpp +++ b/dataenginemanager.cpp @@ -128,8 +128,8 @@ Plasma::DataEngine* DataEngineManager::loadEngine(const QString& name) } else { QVariantList allArgs; allArgs << offers.first()->storageId(); - QString language = offers.first()->property("X-Plasma-Language").toString(); - if (language.isEmpty()) { + QString api = offers.first()->property("X-Plasma-API").toString(); + if (api.isEmpty()) { engine = offers.first()->createInstance(0, allArgs, &error); } else { engine = new DataEngine(0, offers.first()); diff --git a/packagemetadata.cpp b/packagemetadata.cpp index a40357777..e0c44bced 100644 --- a/packagemetadata.cpp +++ b/packagemetadata.cpp @@ -42,7 +42,7 @@ class PackageMetadata::Private QString pluginName; QString type; QString serviceType; - QString language; + QString api; }; PackageMetadata::PackageMetadata() @@ -87,7 +87,7 @@ void PackageMetadata::write(const QString &filename) const config.writeEntry("X-KDE-PluginInfo-Website", d->website); config.writeEntry("X-KDE-PluginInfo-License", d->license); config.writeEntry("X-KDE-PluginInfo-Category", d->type); - config.writeEntry("X-Plasma-Language", d->language); + config.writeEntry("X-Plasma-API", d->api); config.writeEntry("X-KDE-Plasmagik-ApplicationName", d->app); config.writeEntry("X-KDE-Plasmagik-RequiredVersion", d->requiredVersion); } @@ -166,14 +166,14 @@ QString PackageMetadata::type() const return d->type; } -QString PackageMetadata::implementationLanguage() const +QString PackageMetadata::implementationApi() const { - return d->language; + return d->api; } -void PackageMetadata::setImplementationLanguage(const QString& language) +void PackageMetadata::setImplementationApi(const QString& api) { - d->language = language; + d->api = api; } QString PackageMetadata::pluginName() const diff --git a/packagemetadata.h b/packagemetadata.h index 534cb6938..f9a7c9bd0 100644 --- a/packagemetadata.h +++ b/packagemetadata.h @@ -76,7 +76,7 @@ public: QString application() const; QString requiredVersion() const; QString pluginName() const; - QString implementationLanguage() const; + QString implementationApi() const; QString type() const; @@ -92,7 +92,7 @@ public: void setRequiredVersion(const QString &); void setType(const QString& type); void setPluginName(const QString& name); - void setImplementationLanguage(const QString& language); + void setImplementationApi(const QString& language); private: class Private;