mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-24 19:02:27 +01:00
Update to the latest upstream release. Release notes are available at [0]. Patch files have been refreshed and an additional patch to address a test failure has been backported. The tests in general are pretty brittle when it comes to running them in parallel (at least here in our environment), mostly due to race conditions related to file creation/access/deletion. Thus, they are now executed sequentially, which is acceptable given that the total test time is under 2 minutes. [0]: https://github.com/danmar/cppcheck/releases/tag/2.18.0
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
From e3ce27a75f09c919eec74a1416d08f27e615d02f Mon Sep 17 00:00:00 2001
|
|
From: Moritz Haase <Moritz.Haase@bmw.de>
|
|
Date: Mon, 11 Aug 2025 12:58:10 +0200
|
|
Subject: [PATCH 1/3] gui: Set default DATADIR and language
|
|
|
|
---
|
|
gui/main.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/gui/main.cpp b/gui/main.cpp
|
|
index 91bc9e7a0..8b4b7b377 100644
|
|
--- a/gui/main.cpp
|
|
+++ b/gui/main.cpp
|
|
@@ -61,6 +61,9 @@ int main(int argc, char *argv[])
|
|
auto* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
|
|
|
|
// Set data dir..
|
|
+ if ((settings->value("DATADIR", QString()).toString()).isEmpty())
|
|
+ settings->setValue("DATADIR", "/usr/share/cppcheck");
|
|
+
|
|
const QStringList args = QApplication::arguments();
|
|
auto it = std::find_if(args.cbegin(), args.cend(), [](const QString& arg) {
|
|
return arg.startsWith("--data-dir=");
|
|
@@ -70,6 +73,9 @@ int main(int argc, char *argv[])
|
|
return 0;
|
|
}
|
|
|
|
+ if ((settings->value(SETTINGS_LANGUAGE, QString()).toString()).isEmpty())
|
|
+ settings->setValue(SETTINGS_LANGUAGE, "en");
|
|
+
|
|
auto* th = new TranslationHandler(&app);
|
|
th->setLanguage(settings->value(SETTINGS_LANGUAGE, th->suggestLanguage()).toString());
|
|
|