library: use extensions when loading std.cfg and posix.cfg
This commit is contained in:
parent
6785f07458
commit
562387e3ff
|
@ -155,10 +155,10 @@ int CppCheckExecutor::check(int argc, const char* const argv[])
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool std = settings.library.load(argv[0], "std");
|
bool std = settings.library.load(argv[0], "std.cfg");
|
||||||
bool posix = true;
|
bool posix = true;
|
||||||
if (settings.standards.posix)
|
if (settings.standards.posix)
|
||||||
posix = settings.library.load(argv[0], "posix");
|
posix = settings.library.load(argv[0], "posix.cfg");
|
||||||
|
|
||||||
if (!std || !posix) {
|
if (!std || !posix) {
|
||||||
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
const std::list<ErrorLogger::ErrorMessage::FileLocation> callstack;
|
||||||
|
|
|
@ -565,10 +565,10 @@ Settings MainWindow::GetCppcheckSettings()
|
||||||
result.standards.posix = mSettings->value(SETTINGS_STD_POSIX, false).toBool();
|
result.standards.posix = mSettings->value(SETTINGS_STD_POSIX, false).toBool();
|
||||||
|
|
||||||
const QString applicationFilePath = QCoreApplication::applicationFilePath();
|
const QString applicationFilePath = QCoreApplication::applicationFilePath();
|
||||||
bool std = result.library.load(applicationFilePath.toLatin1(), "std");
|
bool std = result.library.load(applicationFilePath.toLatin1(), "std.cfg");
|
||||||
bool posix = true;
|
bool posix = true;
|
||||||
if (result.standards.posix)
|
if (result.standards.posix)
|
||||||
posix = result.library.load(applicationFilePath.toLatin1(), "posix");
|
posix = result.library.load(applicationFilePath.toLatin1(), "posix.cfg");
|
||||||
|
|
||||||
if (!std || !posix)
|
if (!std || !posix)
|
||||||
QMessageBox::warning(this, tr("Error"), tr("Failed to load %1. Your Cppcheck installation is broken.").arg(!std ? "std.cfg" : "posix.cfg"));
|
QMessageBox::warning(this, tr("Error"), tr("Failed to load %1. Your Cppcheck installation is broken.").arg(!std ? "std.cfg" : "posix.cfg"));
|
||||||
|
|
Loading…
Reference in New Issue