From 68a67a910e4e7b35818c07af3fa4fa15535038b0 Mon Sep 17 00:00:00 2001 From: Maksim Derbasov Date: Tue, 17 Dec 2019 10:40:59 +0300 Subject: [PATCH] Remove .dump file after plugins execution (#2451) --- gui/checkthread.cpp | 5 +++++ lib/cppcheck.cpp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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) {