diff --git a/clientgroup.cpp b/clientgroup.cpp index 406c2087ad..b8a6e62172 100644 --- a/clientgroup.cpp +++ b/clientgroup.cpp @@ -208,14 +208,14 @@ void ClientGroup::setVisible( Client* c ) visible_ = indexOfClient( c ); c->setClientShown( true ); - for( ClientList::const_iterator i = clients_.begin(); i != clients_.end(); i++ ) + for( ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++ ) if( (*i) != c ) (*i)->setClientShown( false ); } void ClientGroup::updateStates( Client* main, Client* only ) { - for( ClientList::const_iterator i = clients_.begin(); i != clients_.end(); i++ ) + for( ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++ ) if( (*i) != main && ( !only || (*i) == only )) { if( (*i)->isMinimized() != main->isMinimized() ) @@ -243,7 +243,7 @@ void ClientGroup::updateStates( Client* main, Client* only ) void ClientGroup::updateItems() { items_.clear(); - for( ClientList::const_iterator i = clients_.begin(); i != clients_.end(); i++ ) + for( ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++ ) { QIcon icon( (*i)->icon() ); icon.addPixmap( (*i)->miniIcon() ); @@ -256,7 +256,7 @@ void ClientGroup::updateMinMaxSize() // Determine entire group's minimum and maximum sizes minSize_ = QSize( 0, 0 ); maxSize_ = QSize( INT_MAX, INT_MAX ); - for( ClientList::const_iterator i = clients_.begin(); i != clients_.end(); i++ ) + for( ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++ ) { if( (*i)->minSize().width() > minSize_.width() ) minSize_.setWidth( (*i)->minSize().width() ); @@ -280,7 +280,7 @@ void ClientGroup::updateMinMaxSize() qBound( minSize_.width(), size.width(), maxSize_.width() ), qBound( minSize_.height(), size.height(), maxSize_.height() )); if( newSize != size ) - for( ClientList::const_iterator i = clients_.begin(); i != clients_.end(); i++ ) + for( ClientList::const_iterator i = clients_.constBegin(); i != clients_.constEnd(); i++ ) // TODO: Doesn't affect shaded windows? // There seems to be a race condition when using plainResize() which causes the window // to sometimes be located at new window's location instead of the visible window's location diff --git a/useractions.cpp b/useractions.cpp index 6423227d12..0768c5e03b 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -329,7 +329,7 @@ void Workspace::slotSwitchToTab( QAction* action ) else // Find the client { side -= 2; - for( QList::const_iterator i = clientGroups.begin(); i != clientGroups.end(); ++i ) + for( QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); ++i ) { if( (*i)->contains( active_popup_client )) { @@ -394,7 +394,7 @@ void Workspace::groupTabPopupAboutToShow() return; add_tabs_popup->clear(); int index = 0; - for( QList::const_iterator i = clientGroups.begin(); i != clientGroups.end(); i++, index++ ) + for( QList::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); i++, index++ ) { if( !(*i)->contains( active_popup_client )) { diff --git a/workspace.cpp b/workspace.cpp index ed6208f83a..ab392464b9 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1076,7 +1076,7 @@ void Workspace::slotReconfigure() if( !decorationSupportsClientGrouping() ) { QList tmpGroups = clientGroups; // Prevent crashing - for( QList::const_iterator i = tmpGroups.begin(); i != tmpGroups.end(); i++ ) + for( QList::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); i++ ) (*i)->removeAll(); } mgr->destroyPreviousPlugin();