Skip to content
Bitcoin Roots

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

src/qt/optionsmodel.cpp

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

File metadata
index d52c65d6aeba392e4f15c3b120b947a0a3429afc..5b142292fb6a01911566eddbf9e9bde914012a84 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. The two line-number columns refer to before and after.

src/qt/optionsmodel.cpp CHANGED
@@ -24,6 +24,7 @@
24
24
 
25
25
  #include <QDebug>
26
26
  #include <QLatin1Char>
27
+ #include <QMetaType>
27
28
  #include <QSettings>
28
29
  #include <QStringList>
29
30
  #include <QVariant>
@@ -149,6 +150,11 @@ OptionsModel::FontChoice OptionsModel::FontChoiceFromString(const QString& s)
149
150
  OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent) :
150
151
  QAbstractListModel(parent), m_node{node}
151
152
  {
153
+ #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
154
+ // Qt6 registers enum stream operators automatically; Qt5 needs this before
155
+ // QSettings loads or saves the selected display unit.
156
+ qRegisterMetaTypeStreamOperators<BitcoinUnit>();
157
+ #endif
152
158
  }
153
159
 
154
160
  void OptionsModel::addOverriddenOption(const std::string &option)