aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-03-18 13:57:44 +0100
committerThomas Hartmann <thomas.hartmann@qt.io>2022-03-21 13:58:58 +0000
commit638b93591be0b1ddad4b342c85071d8ac7a8f1fb (patch)
tree1fff9a4187811bf5bf0ca4ea30abf75c0447155e
parent675875c3b4f1435509f94c8c7e8135660bb49e59 (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>
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp27
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h3
2 files changed, 0 insertions, 30 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp
index 09450cdb7c..35b74111d1 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
diff --git a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
index c2c0ba9f36..7bfc6f1558 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h
@@ -38,9 +38,6 @@ public:
explicit Quick2PropertyEditorView(QWidget *parent = nullptr);
static void registerQmlTypes();
-
-protected:
- bool event(QEvent *e) override;
};
} //QmlDesigner