summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qinputcontrol_p.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-03-23 17:13:10 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-03-27 11:32:30 +0000
commit0ec871dac839ea2b2661f1333dad39534e83f19d (patch)
tree208a647f8ab5920d743c8486b96a826bdf02225a /src/gui/text/qinputcontrol_p.h
parent9ccc3070dd284947fc68e9f7964b6bd3ed8123ed (diff)
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 <simon.hausmann@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/gui/text/qinputcontrol_p.h')
-rw-r--r--src/gui/text/qinputcontrol_p.h1
1 files changed, 1 insertions, 0 deletions
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);