Commit 26006d09 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Merge remote-tracking branch 'origin/release/20.04'

parents 8adb341f 1663b185
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
#include "libksieve_debug.h" #include "libksieve_debug.h"
#include <QAction> #include <QAction>
#include <QPointer> #include <QPointer>
#include <QStandardPaths>
#include <QDir> #include <QDir>
#include <QTemporaryFile> #include <QTemporaryFile>
...@@ -407,7 +408,8 @@ void SieveEditorWidget::slotShareScript() ...@@ -407,7 +408,8 @@ void SieveEditorWidget::slotShareScript()
if (zip->open(QIODevice::WriteOnly)) { if (zip->open(QIODevice::WriteOnly)) {
if (zip->addLocalFile(tmpFile.fileName(), sourceName + QLatin1String(".siv"))) { if (zip->addLocalFile(tmpFile.fileName(), sourceName + QLatin1String(".siv"))) {
zip->close(); zip->close();
QPointer<KNS3::UploadDialog> dialog = new KNS3::UploadDialog(QStringLiteral("ksieve_script.knsrc"), this); const QString knsrcPath = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("knsrcfiles/ksieve_script.knsrc"));
QPointer<KNS3::UploadDialog> dialog = new KNS3::UploadDialog(knsrcPath, this);
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName)); dialog->setUploadFile(QUrl::fromLocalFile(zipFileName));
dialog->setUploadName(sourceName); dialog->setUploadName(sourceName);
dialog->setDescription(i18nc("Default description for the source", "My Sieve Script")); dialog->setDescription(i18nc("Default description for the source", "My Sieve Script"));
......
Markdown is supported
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