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