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

View File

@ -46,6 +46,7 @@
#include <vector>
#include <memory>
#include <iostream> // <- TEMPORARY
#include <cstdio>
#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) {