PKGBUILDs/community/cppcheck/translations-location.patch
2020-02-26 04:34:21 +00:00

20 lines
1.1 KiB
Diff

diff -aur cppcheck-1.89/gui/translationhandler.cpp cppcheck-1.89.new/gui/translationhandler.cpp
--- cppcheck-1.89/gui/translationhandler.cpp 2019-09-01 15:01:12.000000000 +0200
+++ cppcheck-1.89.new/gui/translationhandler.cpp 2019-10-02 13:47:44.503900628 +0200
@@ -116,15 +116,7 @@
if (datadir.isEmpty())
datadir = appPath;
- QString translationFile;
- if (QFile::exists(datadir + "/lang/" + mTranslations[index].mFilename + ".qm"))
- translationFile = datadir + "/lang/" + mTranslations[index].mFilename + ".qm";
-
- else if (QFile::exists(datadir + "/" + mTranslations[index].mFilename + ".qm"))
- translationFile = datadir + "/" + mTranslations[index].mFilename + ".qm";
-
- else
- translationFile = appPath + "/" + mTranslations[index].mFilename + ".qm";
+ QString translationFile("/usr/share/cppcheck/cfg/lang/" + mTranslations[index].mFilename + ".qm");
if (!mTranslator->load(translationFile) && !failure) {
//If it failed, lets check if the default file exists