QT_VERSION <6.0

This commit is contained in:
tooomm 2026-03-29 19:31:05 +02:00
parent fa77b696d0
commit e2c89c2a1a
37 changed files with 8 additions and 260 deletions

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):