SocketApi: Adjust the format of the mailto: URL
authorJocelyn Turcotte <jturcotte@woboq.com>
Tue, 4 Jul 2017 14:43:17 +0000 (16:43 +0200)
committerChristian Kamm <mail@ckamm.de>
Fri, 7 Jul 2017 08:49:51 +0000 (10:49 +0200)
Minor tweaks that weren't actually an issue, but just in case.

src/gui/guiutility.cpp
src/gui/socketapi.cpp

index f4b31a7af235acaa1b3aa7c58d403d838e77677d..0a3ee6f0f408db67d7ebc80b94b0c10716ca61d6 100644 (file)
@@ -44,7 +44,7 @@ bool Utility::openBrowser(const QUrl &url, QWidget *errorWidgetParent)
 
 bool Utility::openEmailComposer(const QString &subject, const QString &body, QWidget *errorWidgetParent)
 {
-    QUrl url(QLatin1String("mailto: "));
+    QUrl url(QLatin1String("mailto:"));
     url.setQueryItems({ { QLatin1String("subject"), subject },
         { QLatin1String("body"), body } });
 
index ccfe5167eb4a3e564a7110e95450c715d23a335d..b43d77a4aaf1307a53d54b86b2f5bfe4a553bc9b 100644 (file)
@@ -518,7 +518,7 @@ void SocketApi::command_EMAIL_PRIVATE_LINK(const QString &localFile, SocketListe
     if (!url.isEmpty()) {
         Utility::openEmailComposer(
             tr("I shared something with you"),
-            url.toString(),
+            url.toString(QUrl::FullyEncoded),
             0);
     }
 }