543 void HWForm::GoToVideos() |
553 void HWForm::GoToVideos() |
544 { |
554 { |
545 GoToPage(ID_PAGE_VIDEOS); |
555 GoToPage(ID_PAGE_VIDEOS); |
546 } |
556 } |
547 |
557 |
|
558 //TODO: maybe find a better place for this? |
|
559 QString HWForm::stringifyPageId(quint32 id) |
|
560 { |
|
561 QString pageName; |
|
562 switch (id) |
|
563 { |
|
564 case ID_PAGE_SETUP_TEAM : pageName = "PAGE_SETUP_TEAM"; break; |
|
565 case ID_PAGE_SETUP : pageName = "PAGE_SETUP"; break; |
|
566 case ID_PAGE_MULTIPLAYER : pageName = "PAGE_MULTIPLAYER"; break; |
|
567 case ID_PAGE_DEMOS : pageName = "PAGE_DEMOS"; break; |
|
568 case ID_PAGE_NET : pageName = "PAGE_NET"; break; |
|
569 case ID_PAGE_NETGAME : pageName = "PAGE_NETGAME"; break; |
|
570 case ID_PAGE_INFO : pageName = "PAGE_INFO"; break; |
|
571 case ID_PAGE_MAIN : pageName = "PAGE_MAIN"; break; |
|
572 case ID_PAGE_GAMESTATS : pageName = "PAGE_GAMESTATS"; break; |
|
573 case ID_PAGE_SINGLEPLAYER : pageName = "PAGE_SINGLEPLAYER"; break; |
|
574 case ID_PAGE_TRAINING : pageName = "PAGE_TRAINING"; break; |
|
575 case ID_PAGE_SELECTWEAPON : pageName = "PAGE_SELECTWEAPON"; break; |
|
576 case ID_PAGE_NETSERVER : pageName = "PAGE_NETSERVER"; break; |
|
577 case ID_PAGE_INGAME : pageName = "PAGE_INGAME"; break; |
|
578 case ID_PAGE_ROOMSLIST : pageName = "PAGE_ROOMSLIST"; break; |
|
579 case ID_PAGE_CONNECTING : pageName = "PAGE_CONNECTING"; break; |
|
580 case ID_PAGE_SCHEME : pageName = "PAGE_SCHEME"; break; |
|
581 case ID_PAGE_ADMIN : pageName = "PAGE_ADMIN"; break; |
|
582 case ID_PAGE_CAMPAIGN : pageName = "PAGE_CAMPAIGN"; break; |
|
583 case ID_PAGE_DRAWMAP : pageName = "PAGE_DRAWMAP"; break; |
|
584 case ID_PAGE_DATADOWNLOAD : pageName = "PAGE_DATADOWNLOAD"; break; |
|
585 case ID_PAGE_FEEDBACK : pageName = "PAGE_FEEDBACK"; break; |
|
586 case ID_PAGE_VIDEOS : pageName = "PAGE_VIDEOS"; break; |
|
587 case MAX_PAGE : pageName = "MAX_PAGE"; break; |
|
588 default : pageName = "UNKNOWN_PAGE"; break; |
|
589 } |
|
590 return pageName; |
|
591 } |
|
592 |
548 void HWForm::OnPageShown(quint8 id, quint8 lastid) |
593 void HWForm::OnPageShown(quint8 id, quint8 lastid) |
549 { |
594 { |
550 #ifdef USE_XFIRE |
595 #ifdef USE_XFIRE |
551 updateXfire(); |
596 updateXfire(); |
552 #endif |
597 #endif |
553 |
598 |
554 QString openPrefix = "Debug: (PAGE_OPENED: "; |
599 qDebug("Leaving %s, entering %s", qPrintable(stringifyPageId(lastid)), qPrintable(stringifyPageId(id))); |
555 QString openSuffix = ")"; |
600 |
556 QString closePrefix = "Debug: (PAGE_LEFT: "; |
|
557 QString closeSuffix = ")"; |
|
558 |
|
559 switch (lastid) { //Print the id of the page we're leaving |
|
560 case ID_PAGE_SETUP_TEAM : qDebug("%sPAGE_SETUP_TEAM%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
561 case ID_PAGE_SETUP : qDebug("%sPAGE_SETUP%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
562 case ID_PAGE_MULTIPLAYER : qDebug("%sPAGE_MULTIPLAYER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
563 case ID_PAGE_DEMOS : qDebug("%sPAGE_DEMOS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
564 case ID_PAGE_NET : qDebug("%sPAGE_NET%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
565 case ID_PAGE_NETGAME : qDebug("%sPAGE_NETGAME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
566 case ID_PAGE_INFO : qDebug("%sPAGE_INFO%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
567 case ID_PAGE_MAIN : qDebug("%sPAGE_MAIN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
568 case ID_PAGE_GAMESTATS : qDebug("%sPAGE_GAMESTATS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
569 case ID_PAGE_SINGLEPLAYER : qDebug("%sPAGE_SINGLEPLAYER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
570 case ID_PAGE_TRAINING : qDebug("%sPAGE_TRAINING%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
571 case ID_PAGE_SELECTWEAPON : qDebug("%sPAGE_SELECTWEAPON%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
572 case ID_PAGE_NETSERVER : qDebug("%sPAGE_NETSERVER%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
573 case ID_PAGE_INGAME : qDebug("%sPAGE_INGAME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
574 case ID_PAGE_ROOMSLIST : qDebug("%sPAGE_ROOMSLIST%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
575 case ID_PAGE_CONNECTING : qDebug("%sPAGE_CONNECTING%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
576 case ID_PAGE_SCHEME : qDebug("%sPAGE_SCHEME%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
577 case ID_PAGE_ADMIN : qDebug("%sPAGE_ADMIN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
578 case ID_PAGE_NETTYPE : qDebug("%sPAGE_NETTYPE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
579 case ID_PAGE_CAMPAIGN : qDebug("%sPAGE_CAMPAIGN%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
580 case ID_PAGE_DRAWMAP : qDebug("%sPAGE_DRAWMAP%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
581 case ID_PAGE_DATADOWNLOAD : qDebug("%sPAGE_DATADOWNLOAD%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
582 case ID_PAGE_FEEDBACK : qDebug("%sPAGE_FEEDBACK%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
583 case ID_PAGE_VIDEOS : qDebug("%sPAGE_VIDEOS%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
584 case MAX_PAGE : qDebug("%sMAX_PAGE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
585 default : qDebug("%sUNKNOWN PAGE%s", qPrintable(closePrefix), qPrintable(closeSuffix)); break; |
|
586 } //end switch(lastid) |
|
587 switch (id) { //Print the id of the opened page |
|
588 case ID_PAGE_SETUP_TEAM : qDebug("%sPAGE_SETUP_TEAM%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
589 case ID_PAGE_SETUP : qDebug("%sPAGE_SETUP%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
590 case ID_PAGE_MULTIPLAYER : qDebug("%sPAGE_MULTIPLAYER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
591 case ID_PAGE_DEMOS : qDebug("%sPAGE_DEMOS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
592 case ID_PAGE_NET : qDebug("%sPAGE_NET%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
593 case ID_PAGE_NETGAME : qDebug("%sPAGE_NETGAME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
594 case ID_PAGE_INFO : qDebug("%sPAGE_INFO%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
595 case ID_PAGE_MAIN : qDebug("%sPAGE_MAIN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
596 case ID_PAGE_GAMESTATS : qDebug("%sPAGE_GAMESTATS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
597 case ID_PAGE_SINGLEPLAYER : qDebug("%sPAGE_SINGLEPLAYER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
598 case ID_PAGE_TRAINING : qDebug("%sPAGE_TRAINING%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
599 case ID_PAGE_SELECTWEAPON : qDebug("%sPAGE_SELECTWEAPON%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
600 case ID_PAGE_NETSERVER : qDebug("%sPAGE_NETSERVER%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
601 case ID_PAGE_INGAME : qDebug("%sPAGE_INGAME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
602 case ID_PAGE_ROOMSLIST : qDebug("%sPAGE_ROOMSLIST%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
603 case ID_PAGE_CONNECTING : qDebug("%sPAGE_CONNECTING%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
604 case ID_PAGE_SCHEME : qDebug("%sPAGE_SCHEME%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
605 case ID_PAGE_ADMIN : qDebug("%sPAGE_ADMIN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
606 case ID_PAGE_NETTYPE : qDebug("%sPAGE_NETTYPE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
607 case ID_PAGE_CAMPAIGN : qDebug("%sPAGE_CAMPAIGN%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
608 case ID_PAGE_DRAWMAP : qDebug("%sPAGE_DRAWMAP%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
609 case ID_PAGE_DATADOWNLOAD : qDebug("%sPAGE_DATADOWNLOAD%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
610 case ID_PAGE_FEEDBACK : qDebug("%sPAGE_FEEDBACK%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
611 case ID_PAGE_VIDEOS : qDebug("%sPAGE_VIDEOS%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
612 case MAX_PAGE : qDebug("%sMAX_PAGE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
613 default : qDebug("%sUNKNOWN PAGE%s", qPrintable(openPrefix), qPrintable(openSuffix)); break; |
|
614 } //end switch(id) |
|
615 |
|
616 if (id == ID_PAGE_DATADOWNLOAD) |
601 if (id == ID_PAGE_DATADOWNLOAD) |
617 { |
602 { |
618 ui.pageDataDownload->fetchList(); |
603 ui.pageDataDownload->fetchList(); |
619 } |
604 } |
620 if (id == ID_PAGE_DRAWMAP) |
605 if (id == ID_PAGE_DRAWMAP) |
1879 } |
1852 } |
1880 |
1853 |
1881 // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] |
1854 // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] |
1882 QString HWForm::getDemoArguments() |
1855 QString HWForm::getDemoArguments() |
1883 { |
1856 { |
|
1857 |
|
1858 QString prefix = datadir->absolutePath(); |
|
1859 QString userPrefix = cfgdir->absolutePath(); |
1884 #ifdef Q_WS_WIN |
1860 #ifdef Q_WS_WIN |
1885 QString userdir = cfgdir->absolutePath().replace("/","\\"); |
1861 prefix = prefix.replace("/","\\"); |
1886 #else |
1862 userPrefix = userPrefix.replace("/","\\"); |
1887 QString userdir = cfgdir->absolutePath(); |
1863 #endif |
1888 #endif |
1864 |
1889 |
1865 std::pair<QRect, QRect> resolutions = config->vid_ResolutionPair(); |
1890 QRect resolution = config->vid_Resolution(); |
1866 return QString("--prefix " + prefix |
1891 return QString("--user-dir " + userdir |
1867 + " --user-prefix " + userPrefix |
1892 + " --width " + QString::number(resolution.width()) |
1868 + " --fullscreen-width " + QString::number(resolutions.first.width()) |
1893 + " --height " + QString::number(resolution.height()) |
1869 + " --fullscreen-height " + QString::number(resolutions.first.height()) |
|
1870 + " --width " + QString::number(resolutions.second.width()) |
|
1871 + " --height " + QString::number(resolutions.second.height()) |
1894 + " --volume " + QString::number(config->volume()) |
1872 + " --volume " + QString::number(config->volume()) |
1895 + (config->isMusicEnabled() ? "" : " --nomusic") |
1873 + (config->isMusicEnabled() ? "" : " --nomusic") |
1896 + (config->isSoundEnabled() ? "" : " --nosound") |
1874 + (config->isSoundEnabled() ? "" : " --nosound") |
1897 + " --locale " + config->language() + ".txt" |
1875 + " --locale " + config->language() + ".txt" |
1898 + (config->vid_Fullscreen() ? " --fullscreen" : "") |
1876 + (config->vid_Fullscreen() ? " --fullscreen" : "") |
1912 registry_hkcr.setValue(".hws/Default", "Hedgewars.Save"); |
1890 registry_hkcr.setValue(".hws/Default", "Hedgewars.Save"); |
1913 registry_hkcr.setValue("Hedgewars.Demo/Default", tr("Hedgewars Demo File", "File Types")); |
1891 registry_hkcr.setValue("Hedgewars.Demo/Default", tr("Hedgewars Demo File", "File Types")); |
1914 registry_hkcr.setValue("Hedgewars.Save/Default", tr("Hedgewars Save File", "File Types")); |
1892 registry_hkcr.setValue("Hedgewars.Save/Default", tr("Hedgewars Save File", "File Types")); |
1915 registry_hkcr.setValue("Hedgewars.Demo/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwdfile.ico\",0"); |
1893 registry_hkcr.setValue("Hedgewars.Demo/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwdfile.ico\",0"); |
1916 registry_hkcr.setValue("Hedgewars.Save/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwsfile.ico\",0"); |
1894 registry_hkcr.setValue("Hedgewars.Save/DefaultIcon/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwsfile.ico\",0"); |
1917 registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\" "+arguments); |
1895 registry_hkcr.setValue("Hedgewars.Demo/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"%1\" "+arguments); |
1918 registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"" + datadir->absolutePath().replace("/", "\\") + "\" \"%1\" "+arguments); |
1896 registry_hkcr.setValue("Hedgewars.Save/Shell/Open/Command/Default", "\"" + bindir->absolutePath().replace("/", "\\") + "\\hwengine.exe\" \"%1\" "+arguments); |
1919 #elif defined __APPLE__ |
1897 #elif defined __APPLE__ |
1920 // only useful when other apps have taken precedence over our file extensions and you want to reset it |
1898 // only useful when other apps have taken precedence over our file extensions and you want to reset it |
1921 system("defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerContentTag</key><string>hwd</string><key>LSHandlerContentTagClass</key><string>public.filename-extension</string><key>LSHandlerRoleAll</key><string>org.hedgewars.desktop</string></dict>'"); |
1899 system("defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerContentTag</key><string>hwd</string><key>LSHandlerContentTagClass</key><string>public.filename-extension</string><key>LSHandlerRoleAll</key><string>org.hedgewars.desktop</string></dict>'"); |
1922 system("defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerContentTag</key><string>hws</string><key>LSHandlerContentTagClass</key><string>public.filename-extension</string><key>LSHandlerRoleAll</key><string>org.hedgewars.desktop</string></dict>'"); |
1900 system("defaults write com.apple.LaunchServices LSHandlers -array-add '<dict><key>LSHandlerContentTag</key><string>hws</string><key>LSHandlerContentTagClass</key><string>public.filename-extension</string><key>LSHandlerRoleAll</key><string>org.hedgewars.desktop</string></dict>'"); |
1923 system("/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -domain local -domain system -domain user"); |
1901 system("/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -domain local -domain system -domain user"); |
1979 } |
1957 } |
1980 } |
1958 } |
1981 |
1959 |
1982 void HWForm::SendFeedback() |
1960 void HWForm::SendFeedback() |
1983 { |
1961 { |
1984 //Create Xml representation of google code issue first |
1962 // Get form data |
1985 if (!CreateIssueXml()) |
1963 |
1986 { |
1964 QString summary = ui.pageFeedback->summary->text(); |
1987 ShowErrorMessage(QMessageBox::tr("Please fill out all fields")); |
1965 QString description = ui.pageFeedback->description->toPlainText(); |
1988 return; |
1966 QString email = ui.pageFeedback->email->text(); |
1989 } |
|
1990 |
|
1991 //Submit issue to PHP script |
|
1992 QString source = "HedgewarsFoundation-Hedgewars-"; |
|
1993 source += (cVersionString?(*cVersionString):QString("")); |
|
1994 QString captchaCode = ui.pageFeedback->captcha_code->text(); |
1967 QString captchaCode = ui.pageFeedback->captcha_code->text(); |
1995 QString captchaID = QString::number(ui.pageFeedback->captchaID); |
1968 QString captchaID = QString::number(ui.pageFeedback->captchaID); |
|
1969 QString version = "HedgewarsFoundation-Hedgewars-" + (cVersionString?(*cVersionString):QString("")); |
|
1970 |
|
1971 if (summary.isEmpty() || description.isEmpty()) |
|
1972 { |
|
1973 ShowErrorMessage(QMessageBox::tr("Please fill out all fields. Email is optional.")); |
|
1974 return; |
|
1975 } |
|
1976 |
|
1977 // Submit issue to PHP script |
1996 |
1978 |
1997 QByteArray body; |
1979 QByteArray body; |
1998 body.append("captcha="); |
1980 body.append("captcha="); |
1999 body.append(captchaID); |
1981 body.append(captchaID); |
2000 body.append("&code="); |
1982 body.append("&code="); |
2001 body.append(captchaCode); |
1983 body.append(captchaCode); |
2002 body.append("&source="); |
1984 body.append("&version="); |
2003 body.append(source); |
1985 body.append(QUrl::toPercentEncoding(version)); |
2004 body.append("&issue="); |
1986 body.append("&title="); |
2005 body.append(QUrl::toPercentEncoding(issueXml)); |
1987 body.append(QUrl::toPercentEncoding(summary)); |
|
1988 body.append("&body="); |
|
1989 body.append(QUrl::toPercentEncoding(description)); |
|
1990 body.append("&email="); |
|
1991 body.append(QUrl::toPercentEncoding(email)); |
|
1992 if (ui.pageFeedback->CheckSendSpecs->isChecked()) |
|
1993 { |
|
1994 body.append("&specs="); |
|
1995 body.append(QUrl::toPercentEncoding(ui.pageFeedback->specs)); |
|
1996 } |
2006 |
1997 |
2007 nam = new QNetworkAccessManager(this); |
1998 nam = new QNetworkAccessManager(this); |
2008 connect(nam, SIGNAL(finished(QNetworkReply*)), |
1999 connect(nam, SIGNAL(finished(QNetworkReply*)), |
2009 this, SLOT(finishedSlot(QNetworkReply*))); |
2000 this, SLOT(finishedSlot(QNetworkReply*))); |
2010 |
2001 |
2012 header.setRawHeader("Content-Length", QString::number(body.size()).toAscii()); |
2003 header.setRawHeader("Content-Length", QString::number(body.size()).toAscii()); |
2013 |
2004 |
2014 nam->post(header, body); |
2005 nam->post(header, body); |
2015 } |
2006 } |
2016 |
2007 |
2017 bool HWForm::CreateIssueXml() |
|
2018 { |
|
2019 QString summary = ui.pageFeedback->summary->text(); |
|
2020 QString description = ui.pageFeedback->description->toPlainText(); |
|
2021 QString email = ui.pageFeedback->email->text(); |
|
2022 |
|
2023 //Check if all necessary information is entered |
|
2024 if (summary.isEmpty() || description.isEmpty()) |
|
2025 return false; |
|
2026 |
|
2027 issueXml = |
|
2028 "<?xml version='1.0' encoding='UTF-8'?>" |
|
2029 "<entry xmlns='http://www.w3.org/2005/Atom' xmlns:issues='http://code.google.com/p/hedgewars/issues/list'>" |
|
2030 "<title>"; |
|
2031 issueXml.append(summary); |
|
2032 issueXml.append("</title><content type='html'>"); |
|
2033 issueXml.append(description); |
|
2034 issueXml.append("</content><author><name>feedback.hedgewars</name></author>"); |
|
2035 |
|
2036 if (!email.isEmpty()) |
|
2037 { |
|
2038 issueXml.append("<issues:owner><issues:username>"); |
|
2039 issueXml.append(email); |
|
2040 issueXml.append("</issues:username></issues:owner>"); |
|
2041 issueXml.append("<issues:cc><issues:username>"); |
|
2042 issueXml.append(email); |
|
2043 issueXml.append("</issues:username></issues:cc>"); |
|
2044 } |
|
2045 |
|
2046 issueXml.append("</entry>"); |
|
2047 |
|
2048 return true; |
|
2049 } |
|
2050 |
|
2051 void HWForm::finishedSlot(QNetworkReply* reply) |
2008 void HWForm::finishedSlot(QNetworkReply* reply) |
2052 { |
2009 { |
2053 if (reply && reply->error() == QNetworkReply::NoError) |
2010 if (reply && reply->error() == QNetworkReply::NoError) |
2054 { |
2011 { |
2055 QMessageBox infoMsg(this); |
2012 QMessageBox infoMsg(this); |
2056 infoMsg.setIcon(QMessageBox::Information); |
2013 infoMsg.setIcon(QMessageBox::Information); |
2057 infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success")); |
2014 infoMsg.setWindowTitle(QMessageBox::tr("Hedgewars - Success")); |
2058 infoMsg.setText(QMessageBox::tr("Successfully posted the issue on hedgewars.googlecode.com")); |
2015 infoMsg.setText(reply->readAll()); |
2059 infoMsg.setWindowModality(Qt::WindowModal); |
2016 infoMsg.setWindowModality(Qt::WindowModal); |
2060 infoMsg.exec(); |
2017 infoMsg.exec(); |
2061 |
2018 |
2062 ui.pageFeedback->summary->clear(); |
2019 ui.pageFeedback->summary->clear(); |
|
2020 ui.pageFeedback->email->clear(); |
2063 ui.pageFeedback->description->clear(); |
2021 ui.pageFeedback->description->clear(); |
2064 ui.pageFeedback->EmbedSystemInfo(); |
|
2065 ui.pageFeedback->LoadCaptchaImage(); |
2022 ui.pageFeedback->LoadCaptchaImage(); |
2066 |
2023 |
2067 return; |
2024 return; |
2068 } |
2025 } |
2069 else |
2026 else |