diff --git a/resources/resources.cpp b/resources/resources.cpp index 1c8fe90..23c99d6 100644 --- a/resources/resources.cpp +++ b/resources/resources.cpp @@ -121,7 +121,13 @@ void loadQtTranslationFile(initializer_list repositoryNames, const QStr QString path; if ((!additionalTranslationFilePath().isEmpty() && qtTranslator->load(fileName, path = additionalTranslationFilePath())) - || qtTranslator->load(fileName, path = QLibraryInfo::location(QLibraryInfo::TranslationsPath)) + || qtTranslator->load(fileName, path = +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) + QLibraryInfo::location(QLibraryInfo::TranslationsPath) +#else + QLibraryInfo::path(QLibraryInfo::TranslationsPath) +#endif + ) || qtTranslator->load(fileName, path = QStringLiteral("../share/qt/translations")) || qtTranslator->load(fileName, path = QStringLiteral(":/translations"))) { QCoreApplication::installTranslator(qtTranslator); diff --git a/resources/resources.h b/resources/resources.h index ec9272e..e2d0bfb 100644 --- a/resources/resources.h +++ b/resources/resources.h @@ -4,12 +4,15 @@ #include "../global.h" #include +#include #include QT_FORWARD_DECLARE_CLASS(QString) -QT_FORWARD_DECLARE_CLASS(QStringList) QT_FORWARD_DECLARE_CLASS(QSettings) +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) +QT_FORWARD_DECLARE_CLASS(QStringList) +#endif /*! * \brief Sets the application meta data in the QCoreApplication singleton and attributes commonly used