| 151 | } |
| 152 | |
| 153 | bool EmailCrashReport(QString recvAddress, QString title, QString body, QString userEmail, QString dumpPath, bool onlyDXDiag) |
| 154 | { |
| 155 | #ifndef DISABLE_PHONING |
| 156 | if (!ftManager->hasInternetConnection()) |
| 157 | return false; |
| 158 | |
| 159 | QMessageBox progressDialog(QMessageBox::Information, QT_TRANSLATE_NOOP("WindowsOSStrings", "Please wait..."), QT_TRANSLATE_NOOP("WindowsOSStrings", "Sending the info along to BumpTop HQ...")); |
| 160 | |
| 161 | // show the notification |
| 162 | if (!onlyDXDiag) |
| 163 | { |
| 164 | progressDialog.setWindowModality(Qt::NonModal); |
| 165 | progressDialog.show(); |
| 166 | progressDialog.button(QMessageBox::Ok)->hide(); |
| 167 | qApp->processEvents(); |
| 168 | } |
| 169 | |
| 170 | QString userName = QT_NT("[Reporter] ") + userEmail; |
| 171 | QString encoding = QT_NT("text/html"); |
| 172 | QString subject = title + QString(QT_NT(" rev%1 - ")).arg(SVN_VERSION_NUMBER); |
| 173 | |
| 174 | // enter some defaults if none entered |
| 175 | if (userEmail.isEmpty()) |
| 176 | { |
| 177 | userEmail = QT_NT("noreply@bumptop.com"); |
| 178 | userName = QT_NT("BumpTop Reporter"); |
| 179 | } |
| 180 | |
| 181 | // convert to html newlines for the message |
| 182 | body.replace("\n", "<br/>"); |
| 183 | |
| 184 | // append the pro invite key to the subject |
| 185 | if ((GLOBAL(settings).freeOrProLevel == AL_PRO) && |
| 186 | !GLOBAL(settings).proInviteCode.isEmpty()) |
| 187 | subject += QString(" [%1]").arg(GLOBAL(settings).proInviteCode); |
| 188 | |
| 189 | // append the manf participant id# |
| 190 | #ifdef HWMANFDEMOMODE |
| 191 | #error Not tracking participant IDs anymore |
| 192 | subject.append("tbone study participant id# "); |
| 193 | subject.append(QString::number(GLOBAL(settings).hwManParticipantID)); |
| 194 | #endif |
| 195 | |
| 196 | // load the stats into memory |
| 197 | QString statsPathStr; |
| 198 | if (!onlyDXDiag) |
| 199 | { |
| 200 | statsManager->saveStats(); |
| 201 | QString statsAttachment = statsManager->getStatFileName(); |
| 202 | QFileInfo statsPath(winOS->GetStatsDirectory(), statsAttachment); |
| 203 | if (exists(statsPath)) |
| 204 | statsPathStr = native(statsPath); |
| 205 | } |
| 206 | // load the dxdiag into memory |
| 207 | QString dxdiagContents; |
| 208 | QString dxDiagOutPathStr; |
| 209 | QFileInfo dxDiagOutPath = winOS->CreateDxDiagLog(); |
| 210 | if (exists(dxDiagOutPath)) |
no test coverage detected