diff --git a/gui/checkthread.cpp b/gui/checkthread.cpp index 551eed382..ff9b58b22 100644 --- a/gui/checkthread.cpp +++ b/gui/checkthread.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -339,6 +340,10 @@ void CheckThread::runAddonsAndTools(const ImportProject::FileSettings *fileSetti parseAddonErrors(output, addon); } } + + if (!dumpFile.isEmpty()) { + QFile::remove(dumpFile); + } } void CheckThread::stop() diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 8f2756168..a362799a1 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -46,6 +46,7 @@ #include #include #include // <- TEMPORARY +#include #ifdef HAVE_RULES #define PCRE_STATIC @@ -283,7 +284,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string case simplecpp::Output::PORTABILITY_BACKSLASH: err = false; break; - }; + } if (err) { 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 reportErr(errmsg); } } + std::remove(dumpFile.c_str()); } } catch (const std::runtime_error &e) {