From b54a9931c028799d8506fa47d88376e23d5bdf59 Mon Sep 17 00:00:00 2001 From: Ladislav Foldyna Date: Fri, 1 Dec 2023 11:50:10 +0100 Subject: [PATCH] Fixed compilation issue under QT5.12 --- core/main.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/core/main.cpp b/core/main.cpp index ee44df24..c23d9845 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -72,7 +72,11 @@ static void setupTranslator(QApplication* app, QTranslator* translator = new QTranslator(app); if ( translator->load(translationFile) ) { - qCDebug(runtime) << "Loaded successfully" << translator->filePath(); + qCDebug(runtime) << "Loaded successfully" +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << translator->filePath() +#endif + ; app->installTranslator(translator); return; } @@ -106,7 +110,11 @@ static void setupTranslator(QApplication* app, QTranslator* translator = new QTranslator(app); if ( translator->load(QStringLiteral("i18n%1qlog_%2").arg(QDir::separator(), localeLang), folder) ) { - qCDebug(runtime) << "Loaded successfully" << translator->filePath(); + qCDebug(runtime) << "Loaded successfully" +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << translator->filePath() +#endif + ; app->installTranslator(translator); return; } @@ -118,7 +126,11 @@ static void setupTranslator(QApplication* app, QTranslator* translator = new QTranslator(app); if ( translator->load(":/i18n/qlog_" + localeLang) ) { - qCDebug(runtime) << "Loaded successfully" << translator->filePath(); + qCDebug(runtime) << "Loaded successfully" +#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)) + << translator->filePath() +#endif + ; app->installTranslator(translator); return; }