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:
parent
2534854257
commit
5c396be4e3
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user