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. 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)
|