Make it build with QT_STRICT_ITERATORS.

svn path=/trunk/KDE/kdebase/workspace/; revision=1049926
icc-effect-5.14.5
Kevin Ottens 2009-11-16 08:22:50 +00:00
parent 622828eba4
commit 167823f5fa
3 changed files with 8 additions and 8 deletions

View File

@ -208,14 +208,14 @@ void ClientGroup::setVisible( Client* c )
visible_ = indexOfClient( c ); visible_ = indexOfClient( c );
c->setClientShown( true ); 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 ) if( (*i) != c )
(*i)->setClientShown( false ); (*i)->setClientShown( false );
} }
void ClientGroup::updateStates( Client* main, Client* only ) 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) != main && ( !only || (*i) == only ))
{ {
if( (*i)->isMinimized() != main->isMinimized() ) if( (*i)->isMinimized() != main->isMinimized() )
@ -243,7 +243,7 @@ void ClientGroup::updateStates( Client* main, Client* only )
void ClientGroup::updateItems() void ClientGroup::updateItems()
{ {
items_.clear(); 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() ); QIcon icon( (*i)->icon() );
icon.addPixmap( (*i)->miniIcon() ); icon.addPixmap( (*i)->miniIcon() );
@ -256,7 +256,7 @@ void ClientGroup::updateMinMaxSize()
// Determine entire group's minimum and maximum sizes // Determine entire group's minimum and maximum sizes
minSize_ = QSize( 0, 0 ); minSize_ = QSize( 0, 0 );
maxSize_ = QSize( INT_MAX, INT_MAX ); 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() ) if( (*i)->minSize().width() > minSize_.width() )
minSize_.setWidth( (*i)->minSize().width() ); minSize_.setWidth( (*i)->minSize().width() );
@ -280,7 +280,7 @@ void ClientGroup::updateMinMaxSize()
qBound( minSize_.width(), size.width(), maxSize_.width() ), qBound( minSize_.width(), size.width(), maxSize_.width() ),
qBound( minSize_.height(), size.height(), maxSize_.height() )); qBound( minSize_.height(), size.height(), maxSize_.height() ));
if( newSize != size ) 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? // TODO: Doesn't affect shaded windows?
// There seems to be a race condition when using plainResize() which causes the window // 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 // to sometimes be located at new window's location instead of the visible window's location

View File

@ -329,7 +329,7 @@ void Workspace::slotSwitchToTab( QAction* action )
else // Find the client else // Find the client
{ {
side -= 2; side -= 2;
for( QList<ClientGroup*>::const_iterator i = clientGroups.begin(); i != clientGroups.end(); ++i ) for( QList<ClientGroup*>::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); ++i )
{ {
if( (*i)->contains( active_popup_client )) if( (*i)->contains( active_popup_client ))
{ {
@ -394,7 +394,7 @@ void Workspace::groupTabPopupAboutToShow()
return; return;
add_tabs_popup->clear(); add_tabs_popup->clear();
int index = 0; int index = 0;
for( QList<ClientGroup*>::const_iterator i = clientGroups.begin(); i != clientGroups.end(); i++, index++ ) for( QList<ClientGroup*>::const_iterator i = clientGroups.constBegin(); i != clientGroups.constEnd(); i++, index++ )
{ {
if( !(*i)->contains( active_popup_client )) if( !(*i)->contains( active_popup_client ))
{ {

View File

@ -1076,7 +1076,7 @@ void Workspace::slotReconfigure()
if( !decorationSupportsClientGrouping() ) if( !decorationSupportsClientGrouping() )
{ {
QList<ClientGroup*> tmpGroups = clientGroups; // Prevent crashing QList<ClientGroup*> tmpGroups = clientGroups; // Prevent crashing
for( QList<ClientGroup*>::const_iterator i = tmpGroups.begin(); i != tmpGroups.end(); i++ ) for( QList<ClientGroup*>::const_iterator i = tmpGroups.constBegin(); i != tmpGroups.constEnd(); i++ )
(*i)->removeAll(); (*i)->removeAll();
} }
mgr->destroyPreviousPlugin(); mgr->destroyPreviousPlugin();