2017-05-18 03:52:18 +00:00
|
|
|
diff -up cppcheck-1.79/gui/CMakeLists.txt.translations cppcheck-1.79/gui/CMakeLists.txt
|
|
|
|
--- cppcheck-1.79/gui/CMakeLists.txt.translations 2017-05-18 05:09:44.643624491 +0200
|
|
|
|
+++ cppcheck-1.79/gui/CMakeLists.txt 2017-05-18 05:09:44.651624352 +0200
|
|
|
|
@@ -29,7 +29,7 @@ if (BUILD_GUI)
|
|
|
|
target_link_libraries(cppcheck-gui tinyxml2)
|
|
|
|
|
|
|
|
install(TARGETS cppcheck-gui RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
|
|
- install(FILES ${qms} DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT applications)
|
|
|
|
+ install(FILES ${qms} DESTINATION share/${PROJECT_NAME}/lang/ COMPONENT applications)
|
|
|
|
|
|
|
|
install(FILES cppcheck-gui.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
|
|
|
|
|
|
|
diff -up cppcheck-1.79/gui/translationhandler.cpp.translations cppcheck-1.79/gui/translationhandler.cpp
|
|
|
|
--- cppcheck-1.79/gui/translationhandler.cpp.translations 2017-05-18 05:09:44.649624387 +0200
|
|
|
|
+++ cppcheck-1.79/gui/translationhandler.cpp 2017-05-18 05:14:16.716915424 +0200
|
2016-08-09 06:16:33 +00:00
|
|
|
@@ -116,15 +116,7 @@ bool TranslationHandler::SetLanguage(con
|
2016-04-10 01:30:21 +00:00
|
|
|
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/lang/" + mTranslations[index].mFilename + ".qm");
|
|
|
|
|
|
|
|
if (!mTranslator->load(translationFile) && !failure) {
|
2017-05-18 03:52:18 +00:00
|
|
|
//If it failed, lets check if the default file exists
|