summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qvariant_common
diff options
context:
space:
mode:
authorJari Helaakoski <jari.helaakoski@qt.io>2024-04-24 13:39:38 +0300
committerJari Helaakoski <jari.helaakoski@qt.io>2024-05-06 14:29:02 +0000
commit30cc8a28de3ccc7d02c11c74144971ae289cf076 (patch)
tree2c6f8a2872b3a453f4349610cbb0a7df0b0cda55 /tests/auto/other/qvariant_common
parent7feaf9d41ed962dba04ce29d3a285c54ed04e9fc (diff)
Fix test compilation issues with QtLite configuration
Now developer build tests compile, but some are not working. Functional fix will come later via separate tasks. Task-number: QTBUG-122999 Change-Id: I70487b46c1b32ba4279cb02a4978e4f55ac0d310 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other/qvariant_common')
-rw-r--r--tests/auto/other/qvariant_common/tst_qvariant_common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h
index 553c396e47..4007cc7db8 100644
--- a/tests/auto/other/qvariant_common/tst_qvariant_common.h
+++ b/tests/auto/other/qvariant_common/tst_qvariant_common.h
@@ -119,6 +119,13 @@ protected:
QFETCH(bool, UIntCast); \
QFETCH(bool, ULongLongCast);
+#if QT_CONFIG(shortcut)
+#define QMETATYPE_QKEYSEQUENCE \
+ QCOMPARE(val.canConvert(QMetaType(QMetaType::QKeySequence)), KeySequenceCast);
+#else
+#define QMETATYPE_QKEYSEQUENCE
+#endif
+
#define TST_QVARIANT_CANCONVERT_COMPARE_DATA \
QCOMPARE(val.canConvert(QMetaType(QMetaType::QBitArray)), BitArrayCast); \
QCOMPARE(val.canConvert(QMetaType(QMetaType::QBitmap)), BitmapCast); \
@@ -135,7 +142,7 @@ protected:
QCOMPARE(val.canConvert(QMetaType(QMetaType::QImage)), ImageCast); \
QCOMPARE(val.canConvert(QMetaType(QMetaType::Int)), IntCast); \
QCOMPARE(val.canConvert(QMetaType(QMetaType::UnknownType)), InvalidCast); \
- QCOMPARE(val.canConvert(QMetaType(QMetaType::QKeySequence)), KeySequenceCast); \
+ QMETATYPE_QKEYSEQUENCE \
QCOMPARE(val.canConvert(QMetaType(QMetaType::QVariantList)), ListCast); \
QCOMPARE(val.canConvert(QMetaType(QMetaType::LongLong)), LongLongCast); \
QCOMPARE(val.canConvert(QMetaType(QMetaType::QVariantMap)), MapCast); \