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
This commit is contained in:
defnax 2010-02-16 18:11:26 +00:00
parent 0f4d4dfedc
commit 702ddbd769

View File

@ -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<int>(hInst) <= 32)
{
/* error */
std::cerr << "ShellExecute Error: " << reinterpret_cast<int>(hInst);
std::cerr << std::endl;
}
QDesktopServices::openUrl( QUrl::fromEncoded( mailstr.c_str() ) );
}
#endif
//