diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-03-19 16:45:15 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-03-29 19:31:14 +0100 |
commit | d975ad4ed728553b765c61f38c1e0df899187cf5 (patch) | |
tree | cab1916d88fb6472e051b6b81f97aa3a23407c37 /src/gui/kernel/qguiapplication_p.h | |
parent | bcaff2b06fc46fce8a3ae6d613c025c8d097229c (diff) |
Merge QGuiShortcut and QShortcut again in QtGui
QShortcut has only one widget specific feature, which is whatsThis; that
is just a QString, so the setters and getters can just as well be in
QtGui.
The widgets specific implementation of shortcut matching and of showing
the whatsThis balloon stays in QtWidgets, in the private implementation.
Using virtual functions in the private we can override the empty default
in QtGui, and by adding a virtual factory function in QGuiApplication,
the correct private is instantiated depending on the kind of application
running.
Change-Id: I09ae4a5482f9fb70940c5e2bfe76d3d7fd710afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 80649d067b..ab1e6a46cd 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -81,6 +81,9 @@ class QInputDeviceManager; #ifndef QT_NO_ACTION class QActionPrivate; #endif +#if QT_CONFIG(shortcut) +class QShortcutPrivate; +#endif class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate { @@ -332,6 +335,9 @@ public: #ifndef QT_NO_ACTION virtual QActionPrivate *createActionPrivate() const; #endif +#ifndef QT_NO_SHORTCUT + virtual QShortcutPrivate *createShortcutPrivate() const; +#endif protected: virtual void notifyThemeChanged(); |