Skip to content
Bitcoin Roots

v31.1-roots.1 · Commit 9: [PATCH 09/17] fix(roots): restore audited portability and runtime behavior

src/qt/bitcoin.cpp

Before: src/qt/bitcoin.cpp · After: src/qt/bitcoin.cpp

File metadata
index 6f8a34dadad7a23f55a92ae42b00ccf10a9d6c48..95cffbdca0cf811ecd04e4bd0b1c22b2ad91b5ce 100644

Download original patch · Release notes

Diff rows 1–25 of 25. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/qt/bitcoin.cpp CHANGED
@@ -19,6 +19,7 @@
19
19
  #include <node/interface_ui.h>
20
20
  #include <noui.h>
21
21
  #include <qt/bitcoingui.h>
22
+ #include <qt/bitcoinunits.h>
22
23
  #include <qt/clientmodel.h>
23
24
  #include <qt/guiconstants.h>
24
25
  #include <qt/guiutil.h>
@@ -54,6 +55,7 @@
54
55
  #include <QLibraryInfo>
55
56
  #include <QLocale>
56
57
  #include <QMessageBox>
58
+ #include <QMetaType>
57
59
  #include <QSettings>
58
60
  #include <QThread>
59
61
  #include <QTimer>
@@ -91,6 +93,11 @@ static void RegisterMetaTypes()
91
93
  qRegisterMetaType<QMessageBox::Icon>("QMessageBox::Icon");
92
94
  qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
93
95
  qRegisterMetaType<BitcoinUnit>("BitcoinUnit");
96
+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
97
+ // Translations read QSettings before OptionsModel exists. Register streams
98
+ // here so that parsing language cannot cache an invalid display-unit value.
99
+ qRegisterMetaTypeStreamOperators<BitcoinUnit>();
100
+ #endif
94
101
  }
95
102
 
96
103
  static QString GetLangTerritory()