Remove .dump file after plugins execution (#2451)

This commit is contained in:
Maksim Derbasov 2019-12-17 10:40:59 +03:00 committed by Daniel Marjamäki
parent 7d6582c7a5
commit 68a67a910e
2 changed files with 8 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#include <QString> #include <QString>
#include <QDebug> #include <QDebug>
#include <QDir> #include <QDir>
#include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QJsonDocument> #include <QJsonDocument>
#include <QJsonObject> #include <QJsonObject>
@ -339,6 +340,10 @@ void CheckThread::runAddonsAndTools(const ImportProject::FileSettings *fileSetti
parseAddonErrors(output, addon); parseAddonErrors(output, addon);
} }
} }
if (!dumpFile.isEmpty()) {
QFile::remove(dumpFile);
}
} }
void CheckThread::stop() void CheckThread::stop()

View File

@ -46,6 +46,7 @@
#include <vector> #include <vector>
#include <memory> #include <memory>
#include <iostream> // <- TEMPORARY #include <iostream> // <- TEMPORARY
#include <cstdio>
#ifdef HAVE_RULES #ifdef HAVE_RULES
#define PCRE_STATIC #define PCRE_STATIC
@ -283,7 +284,7 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
case simplecpp::Output::PORTABILITY_BACKSLASH: case simplecpp::Output::PORTABILITY_BACKSLASH:
err = false; err = false;
break; break;
}; }
if (err) { if (err) {
const ErrorLogger::ErrorMessage::FileLocation loc1(output.location.file(), output.location.line, output.location.col); 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); reportErr(errmsg);
} }
} }
std::remove(dumpFile.c_str());
} }
} catch (const std::runtime_error &e) { } catch (const std::runtime_error &e) {