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

Method clearResults

gui/mainwindow.cpp:1448–1463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1446}
1447
1448void MainWindow::clearResults()
1449{
1450 if (mProjectFile && !mProjectFile->getBuildDir().isEmpty()) {
1451 QDir dir(QFileInfo(mProjectFile->getFilename()).absolutePath() + '/' + mProjectFile->getBuildDir());
1452 for (const QString& f: dir.entryList(QDir::Files)) {
1453 if (!f.endsWith("files.txt")) {
1454 static const QRegularExpression rx("^.*.s[0-9]+$");
1455 if (!rx.match(f).hasMatch())
1456 dir.remove(f);
1457 }
1458 }
1459 }
1460 mUI->mResults->clear(true);
1461 Q_ASSERT(false == mUI->mResults->hasResults());
1462 enableResultsButtons();
1463}
1464
1465void MainWindow::openResults()
1466{

Callers

nothing calls this directly

Calls 6

isEmptyMethod · 0.80
getBuildDirMethod · 0.80
endsWithMethod · 0.80
matchMethod · 0.45
clearMethod · 0.45
hasResultsMethod · 0.45

Tested by

no test coverage detected