Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > cf746698214707f972e669b661d0ae59 > files > 23

kdepim4-4.14.10-1.3.mga5.src.rpm

From f6fa0a95cf7a35e227b3859ba057ffcd3d9f6784 Mon Sep 17 00:00:00 2001
From: Allen Winter <winter@kde.org>
Date: Tue, 19 Jan 2016 16:22:28 -0500
Subject: [PATCH 23/74] kmcommands.cpp - in execute() make sure the URL starts
 with "mailto:" else we assert in KPIMUtils::decodeMailtoUrl()

MERGE: yes please
---
 kmail/kmcommands.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index b890769f59..f7f06e92fb 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -401,7 +401,9 @@ KMCommand::Result KMMailtoComposeCommand::execute()
 
     MessageHelper::initHeader( msg, KMKernel::self()->identityManager(),id );
     msg->contentType()->setCharset("utf-8");
-    msg->to()->fromUnicodeString( KPIMUtils::decodeMailtoUrl( mUrl ), "utf-8" );
+    if (mUrl.protocol().toLower() == QLatin1String("mailto") ) {
+      msg->to()->fromUnicodeString( KPIMUtils::decodeMailtoUrl( mUrl ), "utf-8" );
+    }
 
     KMail::Composer * win = KMail::makeComposer( msg, false, false,KMail::Composer::New, id );
     win->setFocusToSubject();
-- 
2.14.1