[CI] Remove Qt5

Took 10 minutes

Took 9 minutes
This commit is contained in:
Lukas Brübach 2026-08-03 13:30:30 +02:00
parent 59d90db3c7
commit e128781bc9
59 changed files with 101 additions and 527 deletions

View file

@ -19,11 +19,7 @@ set(HEADERS
libcockatrice/card/relation/card_relation.h
)
if(Qt6_FOUND)
qt6_wrap_cpp(MOC_SOURCES ${HEADERS})
elseif(Qt5_FOUND)
qt5_wrap_cpp(MOC_SOURCES ${HEADERS})
endif()
qt6_wrap_cpp(MOC_SOURCES ${HEADERS})
add_library(
libcockatrice_card STATIC

View file

@ -25,22 +25,13 @@ bool CardInfoComparator::operator()(const CardInfoPtr &a, const CardInfoPtr &b)
bool CardInfoComparator::compareVariants(const QVariant &a, const QVariant &b) const
{
// Determine the type of QVariant based on Qt version
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (a.typeId() != b.typeId()) {
#else
if (a.type() != b.type()) {
#endif
// If they are not the same type, compare as strings
return a.toString() < b.toString();
}
// Perform type-specific comparison
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
switch (static_cast<int>(a.typeId())) {
#else
switch (static_cast<int>(a.type())) {
#endif
case static_cast<int>(QMetaType::Int):
return a.toInt() < b.toInt();
case static_cast<int>(QMetaType::Double):