Fix execution of executable addons from GUI

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

View File

@ -852,6 +852,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

@ -133,7 +133,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 "";
}