From 44ff9e99566c57fe1509b00bee68367af9aed66f Mon Sep 17 00:00:00 2001 From: Uwe Kindler Date: Fri, 8 Dec 2023 07:58:36 +0100 Subject: [PATCH] Fixed some compiler warnings on Ubuntu 22.04 --- src/DockContainerWidget.cpp | 6 +++--- src/DockManager.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DockContainerWidget.cpp b/src/DockContainerWidget.cpp index b9610ef6..66218ba9 100644 --- a/src/DockContainerWidget.cpp +++ b/src/DockContainerWidget.cpp @@ -2063,7 +2063,7 @@ CDockAreaWidget* CDockContainerWidget::topLevelDockArea() const QList CDockContainerWidget::dockWidgets() const { QList Result; - for (const auto DockArea : d->DockAreas) + for (const auto& DockArea : d->DockAreas) { if (!DockArea) { @@ -2099,7 +2099,7 @@ void CDockContainerWidget::removeAutoHideWidget(CAutoHideDockContainer* Autohide CDockWidget::DockWidgetFeatures CDockContainerWidget::features() const { CDockWidget::DockWidgetFeatures Features(CDockWidget::AllDockWidgetFeatures); - for (const auto DockArea : d->DockAreas) + for (const auto& DockArea : d->DockAreas) { if (!DockArea) { @@ -2122,7 +2122,7 @@ CFloatingDockContainer* CDockContainerWidget::floatingWidget() const //============================================================================ void CDockContainerWidget::closeOtherAreas(CDockAreaWidget* KeepOpenArea) { - for (const auto DockArea : d->DockAreas) + for (const auto& DockArea : d->DockAreas) { if (!DockArea || DockArea == KeepOpenArea) { diff --git a/src/DockManager.cpp b/src/DockManager.cpp index 0415bbec..b26b3ea3 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -587,7 +587,7 @@ bool CDockManager::eventFilter(QObject *obj, QEvent *e) // Window always on top of the MainWindow. if (e->type() == QEvent::WindowActivate) { - for (auto _window : floatingWidgets()) + for (auto _window : d->FloatingWidgets) { if (!_window->isVisible() || window()->isMinimized()) { @@ -609,7 +609,7 @@ bool CDockManager::eventFilter(QObject *obj, QEvent *e) } else if (e->type() == QEvent::WindowDeactivate) { - for (auto _window : floatingWidgets()) + for (auto _window : d->FloatingWidgets) { if (!_window->isVisible() || window()->isMinimized()) { @@ -632,7 +632,7 @@ bool CDockManager::eventFilter(QObject *obj, QEvent *e) // Sync minimize with MainWindow if (e->type() == QEvent::WindowStateChange) { - for (auto _window : floatingWidgets()) + for (auto _window : d->FloatingWidgets) { if (! _window->isVisible()) {