v31.1-roots.1 · Commit 1: [PATCH 01/17] build(roots): establish v31 portability foundation
src/qt/bitcoin.cpp
Before: src/qt/bitcoin.cpp · After: src/qt/bitcoin.cpp
File metadata
index 92c815fe70e563329044a050537b4a1d254417cc..6f8a34dadad7a23f55a92ae42b00ccf10a9d6c48 100644
Download original patch · Release notes
Diff rows 1–11 of 11. Line numbers refer to the original before/after files.
+ Added− RemovedUnmarked lines are context.
Scroll the code area horizontally to read long lines. Before is on the left; after is on the right. Unified view fits narrow screens more easily.
src/qt/bitcoin.cpp
CHANGED
|
@@ -129,7 +129,11 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
|
|
| 129 |
// - First load the translator for the base language, without territory
|
| 130 |
// - Then load the more specific locale translator
|
| 131 |
|
|
|
|
| 132 |
const QString translation_path{QLibraryInfo::path(QLibraryInfo::TranslationsPath)};
|
|
|
|
|
|
|
|
|
|
| 133 |
// Load e.g. qt_de.qm
|
| 134 |
if (qtTranslatorBase.load("qt_" + lang, translation_path)) {
|
| 135 |
QApplication::installTranslator(&qtTranslatorBase);
|
|
|
|
| 129 |
// - First load the translator for the base language, without territory
|
| 130 |
// - Then load the more specific locale translator
|
| 131 |
|
| 132 |
+
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
| 133 |
const QString translation_path{QLibraryInfo::path(QLibraryInfo::TranslationsPath)};
|
| 134 |
+
#else
|
| 135 |
+
const QString translation_path{QLibraryInfo::location(QLibraryInfo::TranslationsPath)};
|
| 136 |
+
#endif
|
| 137 |
// Load e.g. qt_de.qm
|
| 138 |
if (qtTranslatorBase.load("qt_" + lang, translation_path)) {
|
| 139 |
QApplication::installTranslator(&qtTranslatorBase);
|