cppcheck/cppcheck-1.89-translations.patch
Wolfgang Stöggl 613ef46fef New upstream version 1.90
- Drop cppcheck-1.89-manual.patch
  The file manual.docbook has been removed upstream
- Use pandoc to create manual.html from manual.md
- Add reference-cfg-format.html to doc
- Use %%license macro instead of %%doc for the COPYING file
- Fix typo in cppcheck-1.89-translations.patch:
  CppCheck/lang/ -> Cppcheck/lang/
- drop cppcheck-1.87-cfgdir.patch
  FILESDIR is used instead of CFGDIR since 1.89
- Update tinyxml patch to 1.90
2019-12-22 00:02:00 +01:00

33 lines
1.7 KiB
Diff

diff -urp cppcheck-1.89.orig/gui/CMakeLists.txt cppcheck-1.89/gui/CMakeLists.txt
--- cppcheck-1.89.orig/gui/CMakeLists.txt 2019-12-07 13:41:32.651559443 -0500
+++ cppcheck-1.89/gui/CMakeLists.txt 2019-12-07 13:45:16.037535529 -0500
@@ -30,7 +30,7 @@ if (BUILD_GUI)
endif()
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 -urp cppcheck-1.89.orig/gui/translationhandler.cpp cppcheck-1.89/gui/translationhandler.cpp
--- cppcheck-1.89.orig/gui/translationhandler.cpp 2019-09-01 09:01:12.000000000 -0400
+++ cppcheck-1.89/gui/translationhandler.cpp 2019-12-07 13:46:47.085525782 -0500
@@ -116,15 +116,7 @@ bool TranslationHandler::setLanguage(con
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) {
//If it failed, lets check if the default file exists