From 0ec871dac839ea2b2661f1333dad39534e83f19d Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 23 Mar 2017 17:13:10 +0100 Subject: Introduce QInputControl::isCommonTextEditShortcut For handling ShortcutOverride events in text-edit-like controls one must know if a key event matches a common text edit short cut. The code that was formerly in QWidgetTextControl is now moved into QInputControl::isCommonTextEditShortcut to remove duplicated code in QtQuick and to avoid adding adding a third duplicate in QtWebEngine. Task-number: QTBUG-59053 Change-Id: I18723bb0224acd33c8ea4a8d0a601bb5e274a7a9 Reviewed-by: Simon Hausmann Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qinputcontrol_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/text/qinputcontrol_p.h') diff --git a/src/gui/text/qinputcontrol_p.h b/src/gui/text/qinputcontrol_p.h index e5709b5e54..b4c1ca8f8f 100644 --- a/src/gui/text/qinputcontrol_p.h +++ b/src/gui/text/qinputcontrol_p.h @@ -69,6 +69,7 @@ public: explicit QInputControl(Type type, QObject *parent = nullptr); bool isAcceptableInput(const QKeyEvent *event) const; + static bool isCommonTextEditShortcut(const QKeyEvent *ke); protected: explicit QInputControl(Type type, QObjectPrivate &dd, QObject *parent = nullptr); -- cgit v1.2.3