diff options
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.cpp | 27 | ||||
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/quick2propertyeditorview.h | 3 |
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 |