Skip to content

Commit

Permalink
Look for QtKeychain translations with Qt 6, too
Browse files Browse the repository at this point in the history
  • Loading branch information
Kitsune Ral committed Dec 27, 2023
1 parent 9847921 commit f9ca9be
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ int main( int argc, char* argv[] )
qCInfo(MAIN) << "Using locale" << QLocale().name();
}

// Extract a number from another macro and turn it to a const char[]
#define ITOA(i) #i

loadTranslations(
{ { { "qt", "qtbase", "qtnetwork", "qtdeclarative", "qtmultimedia",
"qtquickcontrols", "qtquickcontrols2",
Expand All @@ -151,13 +154,15 @@ int main( int argc, char* argv[] )
QLibraryInfo::location(QLibraryInfo::TranslationsPath) },
{ { "qtkeychain" },
QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"qt5keychain/translations",
"qt" ITOA(QT_VERSION_MAJOR) "keychain/translations",
QStandardPaths::LocateDirectory) },
{ { "qt", "qtkeychain", "quotient", "quaternion" },
QStandardPaths::locate(QStandardPaths::AppLocalDataLocation,
"translations",
QStandardPaths::LocateDirectory) } });

#undef ITOA

Quotient::NetworkSettings().setupApplicationProxy();

MainWindow window;
Expand Down

0 comments on commit f9ca9be

Please sign in to comment.