You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.6 KiB
33 lines
1.6 KiB
diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp
|
|
index 9a916af..c4c60a1 100644
|
|
--- a/shell/scripting/scriptengine.cpp
|
|
+++ b/shell/scripting/scriptengine.cpp
|
|
@@ -875,7 +875,7 @@ QStringList ScriptEngine::pendingUpdateScripts(Plasma::Corona *corona)
|
|
const QString appName = corona->package().metadata().pluginName();
|
|
QStringList scripts;
|
|
|
|
- const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, appName + QStringLiteral("/kpartplugins"), QStandardPaths::LocateDirectory);
|
|
+ const QStringList dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, "plasma/shells/" + appName + QStringLiteral("/updates"), QStandardPaths::LocateDirectory);
|
|
Q_FOREACH(const QString& dir, dirs) {
|
|
QDirIterator it(dir, QStringList() << QStringLiteral("*.js"));
|
|
while (it.hasNext()) {
|
|
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
|
|
index 9f190d6..9c9d52c 100644
|
|
--- a/shell/shellcorona.cpp
|
|
+++ b/shell/shellcorona.cpp
|
|
@@ -552,7 +552,13 @@ void ShellCorona::processUpdateScripts()
|
|
qDebug() << msg;
|
|
});
|
|
foreach (const QString &script, WorkspaceScripting::ScriptEngine::pendingUpdateScripts(this)) {
|
|
- scriptEngine.evaluateScript(script);
|
|
+ QFile file(script);
|
|
+ if (file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
|
|
+ QString code = file.readAll();
|
|
+ scriptEngine.evaluateScript(code);
|
|
+ } else {
|
|
+ qWarning() << "Unable to open the script file" << script << "for reading";
|
|
+ }
|
|
}
|
|
}
|
|
|