v30.3-roots.1 · Commit 5: [PATCH 05/68] feat(qt): preserve Roots identity and GUI support on Core 30.3
src/qt/bitcoin.cpp
Before: src/qt/bitcoin.cpp · After: src/qt/bitcoin.cpp
File metadata
index fe552a574a2a842a3a4f3ddec29fc4e2230a6e7f..910904136cfc0cd647baa994f446d47b19f25bed 100644
Download original patch · Release notes
Diff rows 1–18 of 18. 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);
|
|
@@ -498,6 +502,7 @@ int GuiMain(int argc, char* argv[])
|
|
| 498 |
/// 1. Basic Qt initialization (not dependent on parameters or configuration)
|
| 499 |
Q_INIT_RESOURCE(bitcoin);
|
| 500 |
Q_INIT_RESOURCE(bitcoin_locale);
|
|
|
|
| 501 |
|
| 502 |
#if defined(QT_QPA_PLATFORM_ANDROID)
|
| 503 |
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|
|
|
|
| 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);
|
|
|
|
| 502 |
/// 1. Basic Qt initialization (not dependent on parameters or configuration)
|
| 503 |
Q_INIT_RESOURCE(bitcoin);
|
| 504 |
Q_INIT_RESOURCE(bitcoin_locale);
|
| 505 |
+
Q_INIT_RESOURCE(bitcoin_rendered);
|
| 506 |
|
| 507 |
#if defined(QT_QPA_PLATFORM_ANDROID)
|
| 508 |
QApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
|