summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/divetooltipitem.cpp5
-rw-r--r--profile-widget/profilewidget2.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/profile-widget/divetooltipitem.cpp b/profile-widget/divetooltipitem.cpp
index 0d3e6728c..f88d3b769 100644
--- a/profile-widget/divetooltipitem.cpp
+++ b/profile-widget/divetooltipitem.cpp
@@ -272,8 +272,9 @@ void ToolTipItem::refresh(const QPointF &pos)
}
entryToolTip.first->setPixmap(tissues);
- Q_FOREACH (QGraphicsItem *item, scene()->items(pos, Qt::IntersectsItemBoundingRect
- ,Qt::DescendingOrder, scene()->views().first()->transform())) {
+ const auto l = scene()->items(pos, Qt::IntersectsItemBoundingRect, Qt::DescendingOrder,
+ scene()->views().first()->transform());
+ for (QGraphicsItem *item: l) {
if (!item->toolTip().isEmpty())
addToolTip(item->toolTip());
}
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 157ab9fcd..236afb850 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1101,9 +1101,9 @@ bool ProfileWidget2::eventFilter(QObject *object, QEvent *event)
#endif
template <typename T>
-static void hideAll(T &container)
+static void hideAll(const T &container)
{
- Q_FOREACH (auto *item, container)
+ for (auto *item: container)
item->setVisible(false);
}