From cff492fed1d98f45c4c1f4011f1451120c0d1c23 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 19 Jun 2019 13:00:11 +0200 Subject: Extract QGuiAction(Group) from QAction(Group) into QtGui Simply moving QAction to QtGui was not deemed possible since it operates on a set of controls of some kind. The approach to extract a base class was taken instead, named QGuiAction following the QGuiApplication scheme. QAction remains in widgets, but changes base class. For QActionGroup, the functions addAction(text/icon), which create an action, cannot be implemented in QtGui, hence a base class is needed, too (unless they are deprecated and removed). - Extract base classes providing functionality not based on QtWidgets, using virtuals in QGuiActionPrivate to provide customization points - Change QActionEvent to take QGuiAction, removing the need to forward declare QAction in QtGui [ChangeLog][QtGui] Added QGuiAction(Group) and made the equivalent existing classes in Qt Widgets derive from them. This provides basic functionality for implementing actions in QML. Task-number: QTBUG-69478 Change-Id: Ic490a5e3470939ee8af612d46ff41d4c8c91fbdf Reviewed-by: Lars Knoll Reviewed-by: Mitch Curtis Reviewed-by: Oliver Wolff Reviewed-by: Allan Sandfeld Jensen --- tests/auto/widgets/kernel/qaction/tst_qaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/widgets/kernel/qaction/tst_qaction.cpp') diff --git a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp index 66a82d512d..f19c577088 100644 --- a/tests/auto/widgets/kernel/qaction/tst_qaction.cpp +++ b/tests/auto/widgets/kernel/qaction/tst_qaction.cpp @@ -79,7 +79,7 @@ private slots: private: QEvent::Type m_lastEventType; const int m_keyboardScheme; - QAction *m_lastAction; + QGuiAction *m_lastAction; }; tst_QAction::tst_QAction() -- cgit v1.2.3