Port away from deprecated QVariant::type

Use QMetaType instead to silence compiler warnings.

Pick-to: 6.1
Change-Id: Ic28b3406ddcd51935f42779e7708ea8a459d3a9e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Volker Hilsheimer 2021-03-17 12:02:07 +01:00
parent 2534854257
commit 5c396be4e3

View File

@ -518,11 +518,11 @@ void tst_QClipboard::testWindowsMime()
nativeWindowsApp->registerMime(&testMime);
auto clipboard = QGuiApplication::clipboard();
switch (data.type()) {
case QVariant::String:
switch (data.metaType().id()) {
case QMetaType::QString:
clipboard->setText(data.toString());
break;
case QVariant::Pixmap:
case QMetaType::QPixmap:
clipboard->setPixmap(data.value<QPixmap>());
break;
default: