From 9fb86e649ff436dd78755c9405e93ddc2d52b428 Mon Sep 17 00:00:00 2001 From: Ludovic LANGE Date: Sat, 24 Sep 2022 17:51:25 +0200 Subject: [PATCH] remove qRegisterMetaTypeStreamOperators (qt6) Since Qt6, some methods of [QMetaType are removed](https://doc.qt.io/qt-6/qtcore-changes-qt6.html#the-qmetatype-class). We remove `qRegisterMetaTypeStreamOperators()` calls for Qt >= 6 --- connections/connectionwindow.cpp | 2 ++ mainwindow.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/connections/connectionwindow.cpp b/connections/connectionwindow.cpp index a446078..e277e58 100644 --- a/connections/connectionwindow.cpp +++ b/connections/connectionwindow.cpp @@ -501,8 +501,10 @@ CANConnection* ConnectionWindow::create(CANCon::type pTye, QString pPortName, QS void ConnectionWindow::loadConnections() { +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) qRegisterMetaTypeStreamOperators(); qRegisterMetaTypeStreamOperators>(); +#endif QSettings settings; diff --git a/mainwindow.cpp b/mainwindow.cpp index f32125a..24c013d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -30,8 +30,10 @@ MainWindow::MainWindow(QWidget *parent) : ui(new Ui::MainWindow) { ui->setupUi(this); +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) qRegisterMetaTypeStreamOperators>(); qRegisterMetaTypeStreamOperators>(); +#endif useHex = true;