diff options
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveStatistics.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index 1b3fe9522..dacb01721 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -21,9 +21,9 @@ TabDiveStatistics::TabDiveStatistics(QWidget *parent) : TabBase(parent), ui(new ui->timeLimits->overrideMinToolTipText(tr("Shortest dive")); ui->timeLimits->overrideAvgToolTipText(tr("Average length of all selected dives")); - Q_FOREACH (QObject *obj, children()) { - if (QLabel *label = qobject_cast<QLabel *>(obj)) - label->setAlignment(Qt::AlignHCenter); + const auto l = findChildren<QLabel *>(QString(), Qt::FindDirectChildrenOnly); + for (QLabel *label: l) { + label->setAlignment(Qt::AlignHCenter); } } |