From 1a6e9cd85d7ab372464c7b1442a2b3f075360a4d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 13 Mar 2013 13:07:14 +0100 Subject: [PATCH] remove defaultLayoutScripts this path is now taken from the corona package --- src/shell/scripting/scriptengine.cpp | 50 ---------------------------- src/shell/scripting/scriptengine.h | 3 +- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/src/shell/scripting/scriptengine.cpp b/src/shell/scripting/scriptengine.cpp index 849ec7c7d..d0f25ab41 100644 --- a/src/shell/scripting/scriptengine.cpp +++ b/src/shell/scripting/scriptengine.cpp @@ -684,56 +684,6 @@ QStringList ScriptEngine::pendingUpdateScripts() return scriptPaths; } -QStringList ScriptEngine::defaultLayoutScripts() -{ - const QString appName = KGlobal::activeComponent().aboutData()->appName(); - QStringList appNameDirs = KGlobal::dirs()->findDirs("data", appName); - QStringList scripts; - QDir appDir; - QFileInfoList scriptList; - - foreach (const QString &appNameDir, appNameDirs) { - appDir.setPath(appNameDir + QLatin1String("init/")); - if (appDir.exists()) { - scriptList = appDir.entryInfoList(QStringList("*.js"), - QDir::NoFilter, - QDir::Name); - foreach (const QFileInfo &script, scriptList) { - if (script.exists()) { - scripts.append(script.absoluteFilePath()); - } - } - } - } - - QStringList scriptPaths; - - if (scripts.isEmpty()) { - //kDebug() << "no javascript based layouts"; - return scriptPaths; - } - - const QString localDir = KGlobal::dirs()->localkdedir(); - const QString localXdgDir = KGlobal::dirs()->localxdgdatadir(); - - QSet scriptNames; - foreach (const QString &script, scripts) { - if (script.startsWith(localDir) || script.startsWith(localXdgDir)) { - kDebug() << "skipping user local script: " << script; - continue; - } - - QFileInfo f(script); - QString filename = f.fileName(); - if (!scriptNames.contains(filename)) { - scriptNames.insert(filename); - scriptPaths.append(script); - } - } - - return scriptPaths; -} - } #include "scriptengine.moc" diff --git a/src/shell/scripting/scriptengine.h b/src/shell/scripting/scriptengine.h index 761706d1b..5bd5d72f6 100644 --- a/src/shell/scripting/scriptengine.h +++ b/src/shell/scripting/scriptengine.h @@ -44,7 +44,6 @@ public: ~ScriptEngine(); static QStringList pendingUpdateScripts(); - static QStringList defaultLayoutScripts(); Plasma::Corona *corona() const; bool evaluateScript(const QString &script, const QString &path = QString()); @@ -93,7 +92,7 @@ private: QScriptValue m_scriptSelf; }; -static const int PLASMA_DESKTOP_SCRIPTING_VERSION = 5; +static const int PLASMA_DESKTOP_SCRIPTING_VERSION = 6; } #endif