| 5938 | } |
| 5939 | |
| 5940 | void Key_SendFeedback() |
| 5941 | { |
| 5942 | #if DISABLE_PHONING |
| 5943 | dlgManager->clearState(); |
| 5944 | dlgManager->setPrompt(QT_TRANSLATE_NOOP("BtUtilStrings", "The feedback system is currently disabled.")); |
| 5945 | dlgManager->promptDialog(DialogOK); |
| 5946 | #else |
| 5947 | // try and use the email address they entered last time if they have one |
| 5948 | QString email = GLOBAL(settings).userEmail; |
| 5949 | dlgManager->clearState(); |
| 5950 | dlgManager->setEmail(email); |
| 5951 | |
| 5952 | while (dlgManager->promptDialog(DialogFeedback)) |
| 5953 | { |
| 5954 | QString text = dlgManager->getText(), |
| 5955 | email = dlgManager->getEmail(), |
| 5956 | type = dlgManager->getType(); |
| 5957 | QString subject = QString("[BumpTop Feedback][%1] - %2").arg(type).arg(winOS->GetGUID()); |
| 5958 | dlgManager->clearState(); |
| 5959 | dlgManager->setCaption(QT_TRANSLATE_NOOP("BtUtilStrings", "BumpTop Reporter")); |
| 5960 | |
| 5961 | // save the email address for the future if one is provided and is different than |
| 5962 | // the currently saved one. |
| 5963 | if (!email.isEmpty() && GLOBAL(settings).userEmail != email) |
| 5964 | { |
| 5965 | GLOBAL(settings).userEmail = email; |
| 5966 | winOS->SaveSettingsFile(); |
| 5967 | } |
| 5968 | |
| 5969 | if (EmailCrashReport(QT_NT("feedback@bumptop.com"), subject, text, email, QString())) |
| 5970 | { |
| 5971 | dlgManager->setPrompt(BtUtilStr->getString("FeedbackSent")); |
| 5972 | dlgManager->promptDialog(DialogOK); |
| 5973 | break; |
| 5974 | }else{ |
| 5975 | dlgManager->clearState(); |
| 5976 | dlgManager->setPrompt(BtUtilStr->getString("ErrorFeedback")); |
| 5977 | dlgManager->promptDialog(DialogOK); |
| 5978 | |
| 5979 | // bring up the old dialog so user can copy their text |
| 5980 | dlgManager->clearState(); |
| 5981 | dlgManager->setEmail(email); |
| 5982 | dlgManager->setText(text); |
| 5983 | } |
| 5984 | } |
| 5985 | #endif |
| 5986 | } |
| 5987 | |
| 5988 | void Key_ShowSettingsOpenThemesTab() |
| 5989 | { |
no test coverage detected