Skip to content
Bitcoin Roots

v30.3-roots.1 · Commit 5: [PATCH 05/68] feat(qt): preserve Roots identity and GUI support on Core 30.3

src/qt/optionsmodel.cpp

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

File metadata
index 3d876a8f63bbd2a0bd9b76aed28ff85ecf253ab8..b922ccd6b067afdcf3f81222853df6c69f1f73e0 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/optionsmodel.cpp CHANGED
@@ -24,6 +24,7 @@
24
 
25
  #include <QDebug>
26
  #include <QLatin1Char>
 
27
  #include <QSettings>
28
  #include <QStringList>
29
  #include <QVariant>
@@ -149,6 +150,11 @@ OptionsModel::FontChoice OptionsModel::FontChoiceFromString(const QString& s)
149
  OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent) :
150
  QAbstractListModel(parent), m_node{node}
151
  {
 
 
 
 
 
152
  }
153
 
154
  void OptionsModel::addOverriddenOption(const std::string &option)
 
24
 
25
  #include <QDebug>
26
  #include <QLatin1Char>
27
+ #include <QMetaType>
28
  #include <QSettings>
29
  #include <QStringList>
30
  #include <QVariant>
 
150
  OptionsModel::OptionsModel(interfaces::Node& node, QObject *parent) :
151
  QAbstractListModel(parent), m_node{node}
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
158
  }
159
 
160
  void OptionsModel::addOverriddenOption(const std::string &option)