summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-29 06:20:22 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-29 06:20:22 (GMT)
commitff4f28421e21b75183d8170f1a9cd2b612e28ca4 (patch)
tree2d90a0f8e0a5200277124778229c58368e6b522d
parent9c1856de1351aaea8477bea8148cd10c7171f075 (diff)
Allow to save as desktop file
-rw-r--r--plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
index b0399a3..9f065c1 100644
--- a/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
+++ b/plugins/messageviewerplugins/externalscriptplugin/configuredialog/viewerpluginexternalconfigurewidget.cpp
@@ -167,15 +167,12 @@ void ViewerPluginExternalConfigureWidget::save()
qWarning() << " Impossible to delete " << path;
}
}
-
- //TODO create or adapt desktop file.
for (int i = 0; i < mListExternal->count(); ++i) {
ViewerPluginExternalScriptItem *item = static_cast<ViewerPluginExternalScriptItem *>(mListExternal->item(i));
const ViewerPluginExternalScriptInfo &scriptInfo = item->scriptInfo();
QString filenamepath = scriptInfo.fileName();
if (filenamepath.isEmpty()) {
-
- //TODO add correct filenamepath
+ filenamepath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/messageviewerplugins/%1.desktop").arg(scriptInfo.name());
}
KDesktopFile desktopFile(filenamepath);
desktopFile.desktopGroup().writeEntry(QStringLiteral("Name"), scriptInfo.name());