Commit ff4f2842 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to save as desktop file

parent 9c1856de
......@@ -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());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment