Port to new KDesktopFile constructor

I do not know whether that's the correct new way to locate the desktop
file for our service.
This commit is contained in:
Martin Gräßlin 2013-07-23 07:18:21 +02:00
parent 7193818921
commit 1e0600bbc7

View file

@ -1438,7 +1438,8 @@ bool EffectsHandlerImpl::loadEffect(const QString& name, bool checkDefault)
bool EffectsHandlerImpl::loadScriptedEffect(const QString& name, KService *service)
{
#ifdef KWIN_BUILD_SCRIPTING
const KDesktopFile df("services", service->entryPath());
#warning is DataLocation the right location for our script desktop files?
const KDesktopFile df(QStandardPaths::DataLocation, QStringLiteral("kde5/services/") + service->entryPath());
const QString scriptName = df.desktopGroup().readEntry<QString>(QStringLiteral("X-Plasma-MainScript"), QString());
if (scriptName.isEmpty()) {
kDebug(1212) << "X-Plasma-MainScript not set";