Skip to content

Commit 3f51d0b

Browse files
committed
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
1 parent 18d9189 commit 3f51d0b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/qt/bitcoin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ static void RegisterMetaTypes()
9696
qRegisterMetaType<QMessageBox::Icon>("QMessageBox::Icon");
9797
qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
9898

99+
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
99100
qRegisterMetaTypeStreamOperators<BitcoinUnit>("BitcoinUnit");
101+
#else
102+
qRegisterMetaType<BitcoinUnit>("BitcoinUnit");
103+
#endif
100104
}
101105

102106
static QString GetLangTerritory()

0 commit comments

Comments
 (0)