diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-03-18 13:57:44 +0100 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-03-21 13:58:58 +0000 |
commit | 638b93591be0b1ddad4b342c85071d8ac7a8f1fb (patch) | |
tree | 1fff9a4187811bf5bf0ca4ea30abf75c0447155e /src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp | |
parent | 675875c3b4f1435509f94c8c7e8135660bb49e59 (diff) |
QmlDesigner: Remove unrequired event filterv7.0.0
This event filter was introduced because other wise
actions in QML like CTRL+C or CTRL+UP were intercepted
by QWidget::QAction. With Qt 6.2.x this workaround is not
required anymore.
Change-Id: I43a84ae13cca58840afacabe85c36c5f2235cf39
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp')
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp index 09450cdb7ca..35b74111d1e 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp @@ -91,31 +91,4 @@ void Quick2PropertyEditorView::registerQmlTypes() } } -bool Quick2PropertyEditorView::event(QEvent *e) -{ - static std::vector<QKeySequence> overrideSequences = { QKeySequence(Qt::SHIFT + Qt::Key_Up), - QKeySequence(Qt::SHIFT + Qt::Key_Down), - QKeySequence(Qt::CTRL + Qt::Key_Up), - QKeySequence(Qt::CTRL + Qt::Key_Down) - }; - - if (e->type() == QEvent::ShortcutOverride) { - auto keyEvent = static_cast<QKeyEvent *>(e); - - static const Qt::KeyboardModifiers relevantModifiers = Qt::ShiftModifier - | Qt::ControlModifier - | Qt::AltModifier - | Qt::MetaModifier; - - QKeySequence keySqeuence(keyEvent->key() | (keyEvent->modifiers() & relevantModifiers)); - for (const QKeySequence &overrideSequence : overrideSequences) - if (keySqeuence.matches(overrideSequence)) { - keyEvent->accept(); - return true; - } - } - - return QQuickWidget::event(e); -} - } //QmlDesigner |