diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-02 11:39:07 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-11-02 11:45:51 +0100 |
commit | 4e10a6769fdcaa711dac34dd5dd326c83a27c6bd (patch) | |
tree | 372eff9f11708b8e52cd6449e7c06e7b8b1c0561 /src/imports/platform | |
parent | cfaf1d576fd1f44ea3e424af85dfbaa641d2665d (diff) |
Fix deprecation warnings related to QMetaType
Change-Id: I4e6c1b03915c33f6225c0fb7f86e6acb7715cd4d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/imports/platform')
-rw-r--r-- | src/imports/platform/qquickplatformmenuitem.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/imports/platform/qquickplatformmenuitem.cpp b/src/imports/platform/qquickplatformmenuitem.cpp index 9595a7cc..3916e4ad 100644 --- a/src/imports/platform/qquickplatformmenuitem.cpp +++ b/src/imports/platform/qquickplatformmenuitem.cpp @@ -124,7 +124,7 @@ QQuickPlatformMenuItem::~QQuickPlatformMenuItem() #if QT_CONFIG(shortcut) if (m_shortcutId != -1) { QKeySequence sequence; - if (m_shortcut.type() == QVariant::Int) + if (m_shortcut.metaType().id() == QMetaType::Int) sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt())); else sequence = QKeySequence::fromString(m_shortcut.toString()); @@ -186,7 +186,7 @@ void QQuickPlatformMenuItem::sync() #if QT_CONFIG(shortcut) QKeySequence sequence; - if (m_shortcut.type() == QVariant::Int) + if (m_shortcut.metaType().id() == QMetaType::Int) sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt())); else sequence = QKeySequence::fromString(m_shortcut.toString()); @@ -503,7 +503,7 @@ void QQuickPlatformMenuItem::setShortcut(const QVariant& shortcut) #if QT_CONFIG(shortcut) if (m_shortcutId != -1) { QKeySequence sequence; - if (m_shortcut.type() == QVariant::Int) + if (m_shortcut.metaType().id() == QMetaType::Int) sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt())); else sequence = QKeySequence::fromString(m_shortcut.toString()); @@ -514,7 +514,7 @@ void QQuickPlatformMenuItem::setShortcut(const QVariant& shortcut) sync(); #if QT_CONFIG(shortcut) QKeySequence sequence; - if (m_shortcut.type() == QVariant::Int) + if (m_shortcut.metaType().id() == QMetaType::Int) sequence = QKeySequence(static_cast<QKeySequence::StandardKey>(m_shortcut.toInt())); else sequence = QKeySequence::fromString(m_shortcut.toString()); |