Skip to content

Commit 68a67a9

Browse files
ntfsharddanmar
authored andcommitted
Remove .dump file after plugins execution (#2451)
1 parent 7d6582c commit 68a67a9

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

gui/checkthread.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <QString>
2121
#include <QDebug>
2222
#include <QDir>
23+
#include <QFile>
2324
#include <QFileInfo>
2425
#include <QJsonDocument>
2526
#include <QJsonObject>
@@ -339,6 +340,10 @@ void CheckThread::runAddonsAndTools(const ImportProject::FileSettings *fileSetti
339340
parseAddonErrors(output, addon);
340341
}
341342
}
343+
344+
if (!dumpFile.isEmpty()) {
345+
QFile::remove(dumpFile);
346+
}
342347
}
343348

344349
void CheckThread::stop()

lib/cppcheck.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <vector>
4747
#include <memory>
4848
#include <iostream> // <- TEMPORARY
49+
#include <cstdio>
4950

5051
#ifdef HAVE_RULES
5152
#define PCRE_STATIC
@@ -283,7 +284,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
283284
case simplecpp::Output::PORTABILITY_BACKSLASH:
284285
err = false;
285286
break;
286-
};
287+
}
287288

288289
if (err) {
289290
const ErrorLogger::ErrorMessage::FileLocation loc1(output.location.file(), output.location.line, output.location.col);
@@ -659,6 +660,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
659660
reportErr(errmsg);
660661
}
661662
}
663+
std::remove(dumpFile.c_str());
662664
}
663665

664666
} catch (const std::runtime_error &e) {

0 commit comments

Comments
 (0)