diff --git a/cockatrice/src/server/remote/remote_client.cpp b/cockatrice/src/server/remote/remote_client.cpp index a573765af..1d8579c14 100644 --- a/cockatrice/src/server/remote/remote_client.cpp +++ b/cockatrice/src/server/remote/remote_client.cpp @@ -43,7 +43,7 @@ RemoteClient::RemoteClient(QObject *parent) connect(socket, &QTcpSocket::connected, this, &RemoteClient::slotConnected); connect(socket, &QTcpSocket::readyRead, this, &RemoteClient::readData); -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) connect(socket, &QTcpSocket::errorOccurred, this, &RemoteClient::slotSocketError); #else connect(socket, qOverload(&QTcpSocket::error), this, &RemoteClient::slotSocketError); diff --git a/cockatrice/src/settings/shortcut_treeview.cpp b/cockatrice/src/settings/shortcut_treeview.cpp index 02bc08164..6b329b23d 100644 --- a/cockatrice/src/settings/shortcut_treeview.cpp +++ b/cockatrice/src/settings/shortcut_treeview.cpp @@ -150,7 +150,7 @@ void ShortcutTreeView::currentChanged(const QModelIndex ¤t, const QModelIn */ void ShortcutTreeView::updateSearchString(const QString &searchString) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) +#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0) const auto skipEmptyParts = Qt::SkipEmptyParts; #else const auto skipEmptyParts = QString::SkipEmptyParts; diff --git a/cockatrice/src/utility/card_info_comparator.cpp b/cockatrice/src/utility/card_info_comparator.cpp index 26d00420f..821cc8675 100644 --- a/cockatrice/src/utility/card_info_comparator.cpp +++ b/cockatrice/src/utility/card_info_comparator.cpp @@ -37,17 +37,17 @@ bool CardInfoComparator::compareVariants(const QVariant &a, const QVariant &b) c // Perform type-specific comparison #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) - switch (a.typeId()) { + switch (static_cast(a.typeId())) { #else - switch (a.type()) { + switch (static_cast(a.type())) { #endif - case QMetaType::Int: + case static_cast(QMetaType::Int): return a.toInt() < b.toInt(); - case QMetaType::Double: + case static_cast(QMetaType::Double): return a.toDouble() < b.toDouble(); - case QMetaType::QString: + case static_cast(QMetaType::QString): return a.toString() < b.toString(); - case QMetaType::Bool: + case static_cast(QMetaType::Bool): return a.toBool() < b.toBool(); default: // Default to comparing as strings