summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qaction.cpp')
-rw-r--r--src/widgets/kernel/qaction.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp
index 57b1f31188..a7116b1462 100644
--- a/src/widgets/kernel/qaction.cpp
+++ b/src/widgets/kernel/qaction.cpp
@@ -114,7 +114,7 @@ void QActionPrivate::sendDataChanged()
QWidget *w = widgets.at(i);
QApplication::sendEvent(w, &e);
}
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
for (int i = 0; i < graphicsWidgets.size(); ++i) {
QGraphicsWidget *w = graphicsWidgets.at(i);
QApplication::sendEvent(w, &e);
@@ -279,6 +279,8 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map)
/*!
Constructs an action with \a parent. If \a parent is an action
group the action will be automatically inserted into the group.
+
+ \note The \a parent argument is optional since Qt 5.7.
*/
QAction::QAction(QObject* parent)
: QAction(*new QActionPrivate, parent)
@@ -360,7 +362,7 @@ QList<QWidget *> QAction::associatedWidgets() const
return d->widgets;
}
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
/*!
\since 4.5
Returns a list of widgets this action has been added to.
@@ -565,7 +567,7 @@ QAction::~QAction()
QWidget *w = d->widgets.at(i);
w->removeAction(this);
}
-#ifndef QT_NO_GRAPHICSVIEW
+#if QT_CONFIG(graphicsview)
for (int i = d->graphicsWidgets.size()-1; i >= 0; --i) {
QGraphicsWidget *w = d->graphicsWidgets.at(i);
w->removeAction(this);