aboutsummaryrefslogtreecommitdiffstats
path: root/testing/cppcheck/set_datadir.patch
diff options
context:
space:
mode:
authorAmatCoder <amatcoder@gmail.com>2015-01-22 05:34:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-22 11:07:06 +0000
commitfd81a5935eeb562f93d2e7cd9d66c1f428dff2a5 (patch)
treea9d3ce5d27540971464738307fa81a3d453a2611 /testing/cppcheck/set_datadir.patch
parente0681cfa7d586af49e81362bd0ce220402c37389 (diff)
downloadaports-fd81a5935eeb562f93d2e7cd9d66c1f428dff2a5.tar.gz
aports-fd81a5935eeb562f93d2e7cd9d66c1f428dff2a5.tar.bz2
aports-fd81a5935eeb562f93d2e7cd9d66c1f428dff2a5.tar.xz
testing/cppcheck: new aport
Diffstat (limited to 'testing/cppcheck/set_datadir.patch')
-rw-r--r--testing/cppcheck/set_datadir.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/cppcheck/set_datadir.patch b/testing/cppcheck/set_datadir.patch
new file mode 100644
index 0000000000..c00e5433fa
--- /dev/null
+++ b/testing/cppcheck/set_datadir.patch
@@ -0,0 +1,21 @@
+--- cppcheck-1.68-origin/gui/main.cpp
++++ cppcheck-1.68/gui/main.cpp
+@@ -57,12 +57,18 @@
+ QSettings* settings = new QSettings("Cppcheck", "Cppcheck-GUI", &app);
+
+ // Set data dir..
++ if ((settings->value("DATADIR", QString()).toString()).isEmpty())
++ settings->setValue("DATADIR", "/usr/share/cppcheck");
++
+ foreach(const QString arg, app.arguments()) {
+ if (arg.startsWith("--data-dir=")) {
+ settings->setValue("DATADIR", arg.mid(11));
+ return 0;
+ }
+ }
++
++ if ((settings->value(SETTINGS_LANGUAGE, QString()).toString()).isEmpty())
++ settings->setValue(SETTINGS_LANGUAGE, "en");
+
+ TranslationHandler* th = new TranslationHandler(&app);
+ th->SetLanguage(settings->value(SETTINGS_LANGUAGE, th->SuggestLanguage()).toString());