Fix execution of executable addons from GUI

This commit is contained in:
Daniel Marjamäki 2021-12-15 19:22:29 +01:00
parent db8d486ce4
commit 800317aad0
2 changed files with 4 additions and 1 deletions

View File

@ -854,6 +854,9 @@ Settings MainWindow::getCppcheckSettings()
Settings result;
const QString applicationFilePath = QCoreApplication::applicationFilePath();
result.exename = applicationFilePath.toStdString();
const bool std = tryLoadLibrary(&result.library, "std.cfg");
bool posix = true;
if (result.posix())

View File

@ -131,7 +131,7 @@ namespace {
if (obj.count("executable")) {
if (!obj["executable"].is<std::string>())
return "Loading " + fileName + " failed. executable must be a string.";
executable = getFullPath(obj["executable"].get<std::string>(), exename);
executable = getFullPath(obj["executable"].get<std::string>(), fileName);
return "";
}