| 1255 | } |
| 1256 | |
| 1257 | void MainWindow::analysisDone() |
| 1258 | { |
| 1259 | if (mExiting) { |
| 1260 | close(); |
| 1261 | return; |
| 1262 | } |
| 1263 | |
| 1264 | mUI->mResults->checkingFinished(); |
| 1265 | enableCheckButtons(true); |
| 1266 | mUI->mActionSettings->setEnabled(true); |
| 1267 | mUI->mActionOpenXML->setEnabled(true); |
| 1268 | if (mProjectFile) { |
| 1269 | enableProjectActions(true); |
| 1270 | } else if (mIsLogfileLoaded) { |
| 1271 | mUI->mActionReanalyzeModified->setEnabled(false); |
| 1272 | mUI->mActionReanalyzeAll->setEnabled(false); |
| 1273 | } |
| 1274 | enableProjectOpenActions(true); |
| 1275 | mPlatformActions->setEnabled(true); |
| 1276 | mCStandardActions->setEnabled(true); |
| 1277 | mCppStandardActions->setEnabled(true); |
| 1278 | mSelectLanguageActions->setEnabled(true); |
| 1279 | mUI->mActionPosix->setEnabled(true); |
| 1280 | if (mScratchPad) |
| 1281 | mScratchPad->setEnabled(true); |
| 1282 | mUI->mActionViewStats->setEnabled(true); |
| 1283 | |
| 1284 | if (mProjectFile && !mProjectFile->getBuildDir().isEmpty()) { |
| 1285 | const QString prjpath = QFileInfo(mProjectFile->getFilename()).absolutePath(); |
| 1286 | const QString buildDir = prjpath + '/' + mProjectFile->getBuildDir(); |
| 1287 | if (QDir(buildDir).exists()) { |
| 1288 | mUI->mResults->saveStatistics(buildDir + "/statistics.txt"); |
| 1289 | mUI->mResults->updateFromOldReport(buildDir + "/lastResults.xml"); |
| 1290 | mUI->mResults->save(buildDir + "/lastResults.xml", Report::XMLV2, mCppcheckCfgProductName); |
| 1291 | } |
| 1292 | } |
| 1293 | |
| 1294 | enableResultsButtons(); |
| 1295 | |
| 1296 | for (QAction* recentProjectAct : mRecentProjectActs) { |
| 1297 | if (recentProjectAct != nullptr) |
| 1298 | recentProjectAct->setEnabled(true); |
| 1299 | } |
| 1300 | |
| 1301 | // Notify user - if the window is not active - that check is ready |
| 1302 | QApplication::alert(this, 3000); |
| 1303 | if (mSettings->value(SETTINGS_SHOW_STATISTICS, false).toBool()) |
| 1304 | showStatistics(); |
| 1305 | } |
| 1306 | |
| 1307 | void MainWindow::checkLockDownUI() |
| 1308 | { |
nothing calls this directly
no test coverage detected