summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-01-23 13:09:03 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-02-13 16:29:25 +0000
commit651329adb5e64b18a005e900e1b9c5e95d70258c (patch)
tree94e8eace0a8e39390191eb37ddb4e5a89e434507 /src/widgets/graphicsview
parent9b67d89c24666d405dd00e63bb56c924738aa002 (diff)
Pass params of shareable type by const-ref rather than by value
Instead of leaving a note for Qt6 and then forget to do the actual change once again, change APIs now inside QT_VERSION >= QT_VERSION_CHECK(6,0,0) blocks. Change-Id: Ifa769904e304358a9c2accfd6c9f86eeb342f9dc Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index 6d78b3bc99..6f10e2854c 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -1994,7 +1994,11 @@ void QGraphicsWidget::addAction(QAction *action)
\sa removeAction(), QMenu, addAction(), QWidget::addActions()
*/
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+void QGraphicsWidget::addActions(const QList<QAction *> &actions)
+#else
void QGraphicsWidget::addActions(QList<QAction *> actions)
+#endif
{
for (int i = 0; i < actions.count(); ++i)
insertAction(0, actions.at(i));
diff --git a/src/widgets/graphicsview/qgraphicswidget.h b/src/widgets/graphicsview/qgraphicswidget.h
index 8e64e180a5..3ecdeac158 100644
--- a/src/widgets/graphicsview/qgraphicswidget.h
+++ b/src/widgets/graphicsview/qgraphicswidget.h
@@ -137,7 +137,11 @@ public:
#ifndef QT_NO_ACTION
//actions
void addAction(QAction *action);
+#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
+ void addActions(const QList<QAction*> &actions);
+#else
void addActions(QList<QAction*> actions);
+#endif
void insertAction(QAction *before, QAction *action);
void insertActions(QAction *before, QList<QAction*> actions);
void removeAction(QAction *action);