aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-06-21 13:14:21 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-06-21 13:14:21 +0200
commit3f51d0b8b2b2fabf5e305bd71226a8e3e5f3ad2d (patch)
treeb1b6ba698d27e458779c731eae54f7fa023ced96 /src/qt
parent18d9189cc934e5ee01a254f5fd39d80457c55ecb (diff)
qt6: Fix type registration
In Qt 6, registration of `QDataStream` streaming operators is done automatically. Consequently, `qRegisterMetaTypeStreamOperators()` does no longer exist. Calls to this method have to be removed when porting to Qt 6. See https://doc.qt.io/qt-6/qtcore-changes-qt6.html#the-qmetatype-class
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index f11ddad30f..c20a1dda97 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -96,7 +96,11 @@ static void RegisterMetaTypes()
qRegisterMetaType<QMessageBox::Icon>("QMessageBox::Icon");
qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
+#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
qRegisterMetaTypeStreamOperators<BitcoinUnit>("BitcoinUnit");
+#else
+ qRegisterMetaType<BitcoinUnit>("BitcoinUnit");
+#endif
}
static QString GetLangTerritory()