summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qlineedit_p.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-06-19 13:00:11 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-10-31 10:14:55 +0100
commitcff492fed1d98f45c4c1f4011f1451120c0d1c23 (patch)
treee13e62fc77ea4e42c0835cd444e5811f7e054875 /src/widgets/widgets/qlineedit_p.cpp
parentd273076b4474bb473d90e996960c4c773745761a (diff)
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 <lars.knoll@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/widgets/widgets/qlineedit_p.cpp')
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index d2b5f87906..f6e7337878 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -370,7 +370,7 @@ void QLineEditIconButton::actionEvent(QActionEvent *e)
{
switch (e->type()) {
case QEvent::ActionChanged: {
- const QAction *action = e->action();
+ const auto *action = e->action();
if (isVisibleTo(parentWidget()) != action->isVisible()) {
setVisible(action->isVisible());
if (QLineEditPrivate *lep = lineEditPrivate())
@@ -545,7 +545,7 @@ void QLineEditPrivate::positionSideWidgets()
}
}
-QLineEditPrivate::SideWidgetLocation QLineEditPrivate::findSideWidget(const QAction *a) const
+QLineEditPrivate::SideWidgetLocation QLineEditPrivate::findSideWidget(const QGuiAction *a) const
{
int i = 0;
for (const auto &e : leadingSideWidgets) {
@@ -634,7 +634,7 @@ QWidget *QLineEditPrivate::addAction(QAction *newAction, QAction *before, QLineE
return w;
}
-void QLineEditPrivate::removeAction(QAction *action)
+void QLineEditPrivate::removeAction(QGuiAction *action)
{
#if QT_CONFIG(action)
Q_Q(QLineEdit);