MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / analysisDone

Method analysisDone

gui/mainwindow.cpp:1257–1305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1255}
1256
1257void 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
1307void MainWindow::checkLockDownUI()
1308{

Callers

nothing calls this directly

Calls 9

checkingFinishedMethod · 0.80
setEnabledMethod · 0.80
isEmptyMethod · 0.80
getBuildDirMethod · 0.80
saveStatisticsMethod · 0.80
existsMethod · 0.45
updateFromOldReportMethod · 0.45
saveMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected