From 3f51d0b8b2b2fabf5e305bd71226a8e3e5f3ad2d Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 21 Jun 2022 13:14:21 +0200 Subject: [PATCH] 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 --- src/qt/bitcoin.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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"); qRegisterMetaType("interfaces::BlockAndHeaderTipInfo"); +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) qRegisterMetaTypeStreamOperators("BitcoinUnit"); +#else + qRegisterMetaType("BitcoinUnit"); +#endif } static QString GetLangTerritory()