From 702ddbd769ff307532d320910484bb5c26f27e1f Mon Sep 17 00:00:00 2001 From: defnax Date: Tue, 16 Feb 2010 18:11:26 +0000 Subject: [PATCH] fixed to work again to launch the default email client under win when push the email button on ConnectFriendWizard git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2342 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- .../src/gui/connect/ConnectFriendWizard.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp index 5c587334b..c91d53705 100755 --- a/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp +++ b/retroshare-gui/src/gui/connect/ConnectFriendWizard.cpp @@ -297,7 +297,8 @@ void TextPage::runEmailClient() { std::string mailstr = "mailto:"; - mailstr += "?subject=RetroShare Invite"; + + mailstr += "?subject=RetroShare Invite"; mailstr += "&body="; @@ -312,15 +313,7 @@ TextPage::runEmailClient() mailstr.replace(loc, 1, "%0D%0A"); } - HINSTANCE hInst = ShellExecuteA(0, "open", mailstr.c_str(), - NULL, NULL, SW_SHOW); - - if(reinterpret_cast(hInst) <= 32) - { - /* error */ - std::cerr << "ShellExecute Error: " << reinterpret_cast(hInst); - std::cerr << std::endl; - } + QDesktopServices::openUrl( QUrl::fromEncoded( mailstr.c_str() ) ); } #endif //