diff --git a/examples/dockindock/dockindock.cpp b/examples/dockindock/dockindock.cpp index cf9bbeb..adbca68 100644 --- a/examples/dockindock/dockindock.cpp +++ b/examples/dockindock/dockindock.cpp @@ -206,10 +206,10 @@ void DockInDockWidget::fillPerspectivesMenu( QMenu* menu ) if ( !perspectiveNames.isEmpty() ) { QMenu* load = menu->addMenu( "Load perspective" ); - for ( auto name : perspectiveNames ) + for ( const QString& name : perspectiveNames ) load->addAction( new LoadPerspectiveAction( load, name, *this ) ); QMenu* remove = menu->addMenu( "Remove perspective" ); - for ( auto name : perspectiveNames ) + for ( const QString& name : perspectiveNames ) remove->addAction( new RemovePerspectiveAction( remove, name, *this ) ); } } diff --git a/examples/dockindock/perspectives.cpp b/examples/dockindock/perspectives.cpp index 29002b3..3ba3664 100644 --- a/examples/dockindock/perspectives.cpp +++ b/examples/dockindock/perspectives.cpp @@ -21,7 +21,7 @@ PerspectivesManager::PerspectivesManager( const QString& perspectivesFolder ) : PerspectivesManager::~PerspectivesManager() { // remove temp files: - for ( auto perspective : m_perspectives ) + for ( auto& perspective : m_perspectives ) { QString fileName = perspective.settings->fileName(); perspective.settings.reset(); @@ -219,7 +219,7 @@ void PerspectivesManager::loadPerspectives() // load group info: mainSettings->beginGroup(GROUP_PREFIX); - for ( auto key : mainSettings->allKeys() ) + for ( const QString& key : mainSettings->allKeys() ) m_perspectives[perspective].groups[key] = mainSettings->value( key ).toStringList(); mainSettings->endGroup(); } diff --git a/src/DockManager.cpp b/src/DockManager.cpp index ea98221..1f42ed1 100644 --- a/src/DockManager.cpp +++ b/src/DockManager.cpp @@ -928,7 +928,7 @@ void CDockManager::removePerspective(const QString& Name) void CDockManager::removePerspectives(const QStringList& Names) { int Count = 0; - for (auto Name : Names) + for (const QString& Name : Names) { Count += d->Perspectives.remove(Name); }