Commit 2f9ec03f authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Rolf Eike Beer
Browse files

port away from KToolInvocation::invokeMailer()

parent 54f45609
......@@ -27,9 +27,9 @@
#include <KDebug>
#include <KLocale>
#include <KToolInvocation>
#include <KMessageBox>
#include <QDesktopServices>
#include <QDir>
#include <QFileInfo>
#include <QTemporaryDir>
......@@ -354,9 +354,9 @@ KGpgCaffPrivate::slotTextEncrypted(int result)
const QString email = uid->getEmail();
const QString keyid = uid->getKeyNode()->getId();
KToolInvocation::invokeMailer(email, QString(), QString(),
i18nc("%1 is 64 bit key id (in hex), text is used as email subject", "Your key %1", keyid),
text);
QDesktopServices::openUrl(QUrl(QLatin1String("mailto:") + email +
QLatin1String("?subject=") + i18nc("%1 is 64 bit key id (in hex), text is used as email subject", "Your key %1", keyid) +
QLatin1String("?body=") + text));
break;
}
default:
......
......@@ -84,6 +84,7 @@
#include <QApplication>
#include <QClipboard>
#include <QDBusConnection>
#include <QDesktopServices>
#include <QDir>
#include <QEvent>
#include <QFileDialog>
......@@ -1520,7 +1521,7 @@ void KeysManager::slotProcessExportMail(int result)
// start default Mail application
if (result == KGpgTransaction::TS_OK) {
KToolInvocation::invokeMailer(QString(), QString(), QString(), QString(),QLatin1String( exp->getOutputData() ));
QDesktopServices::openUrl(QUrl(QLatin1String("mailto:?body=") + QLatin1String(exp->getOutputData())));
} else {
KMessageBox::sorry(this, i18n("Your public key could not be exported\nCheck the key."));
}
......@@ -2252,7 +2253,7 @@ void KeysManager::slotSendEmail()
if (maillist.isEmpty())
return;
KToolInvocation::invokeMailer(maillist.join(QLatin1String(", ")), QString());
QDesktopServices::openUrl(QUrl(QLatin1String("mailto:") + maillist.join(QLatin1String(", "))));
}
void KeysManager::slotedit()
......
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