Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.0.0 Beta3
-
None
-
Windows 10 (FR). MSVC 2019 x64.
-
-
837a29b0b92c72b7b9d66a427c24a9fa8037f4f4 (qt/qtbase dev)
Description
Hello,
I'm compiling a project with Qt 6.0.0 b3 and it seems ther is a bug with QCoreApplication::installTranslator.
When calling it in Qt 5.13 -> OK. Same code in Qt 6.0.0 (and same code as in doc) -> KO.
Here is my code sample :
bool trResult= translator.load(QLocale(), QLatin1String("ademasJournalExploit"), QLatin1String("_"), QLatin1String(":/languages")); qInfo() << trResult; // true #if QT_VERSION >= 0x060000 trResult= translatorQt.load(QLocale(), QLatin1String("qt"), QLatin1String("_"), QLibraryInfo::path(QLibraryInfo::TranslationsPath)); qInfo() << trResult; // false (first issue) #else trResult= translatorQt.load(QLocale(), QLatin1String("qt"), QLatin1String("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath)); // true with Qt 5.13 #endif qInfo() << QCoreApplication::installTranslator(&translator); // false with Qt 6.0.0 & true with Qt 5.13 qInfo() << QCoreApplication::installTranslator(&translatorQt); // false with Qt 6.0.0 & true with Qt 5.13
Even if I only put my translation file, same results. Translation files are in my qrc file and released with QtLinguist.
Best regards,