diff --git a/kcmkwin/kwindecoration/buttons.cpp b/kcmkwin/kwindecoration/buttons.cpp index 60cf2b1e0a..cc1fb9c121 100644 --- a/kcmkwin/kwindecoration/buttons.cpp +++ b/kcmkwin/kwindecoration/buttons.cpp @@ -457,18 +457,18 @@ bool ButtonDropSite::getItemIterator(ButtonDropSiteItem *item, ButtonList* &list if (!item) return false; - ButtonList::iterator it = buttonsLeft.find(item); // try the left list first... - if (it == buttonsLeft.end() ) { - it = buttonsRight.find(item); // try the right list... - if (it == buttonsRight.end() ) { + int ind = buttonsLeft.indexOf(item); // try the left list first... + if (ind < 0 ) { + ind = buttonsRight.indexOf(item); // try the right list... + if ( ind < 0 ) { return false; // item hasn't been found in one of the list, return... } else { list = &buttonsRight; - iterator = it; + iterator = buttonsRight.begin()+ind; } } else { list = &buttonsLeft; - iterator = it; + buttonsLeft.begin()+ind; } return true; diff --git a/layers.cpp b/layers.cpp index b546396df5..54cb1e7e87 100644 --- a/layers.cpp +++ b/layers.cpp @@ -454,7 +454,7 @@ void Workspace::restoreSessionStackingOrder( Client* c ) if( c->sessionStackingOrder() < 0 ) return; StackingUpdatesBlocker blocker( this ); - unconstrained_stacking_order.remove( c ); + unconstrained_stacking_order.removeAll( c ); ClientList::Iterator best_pos = unconstrained_stacking_order.end(); for( ClientList::Iterator it = unconstrained_stacking_order.begin(); // from bottom it != unconstrained_stacking_order.end(); diff --git a/sm.cpp b/sm.cpp index e1f205b4bd..d89d0cfd8f 100644 --- a/sm.cpp +++ b/sm.cpp @@ -114,7 +114,7 @@ void Workspace::storeSession( KConfig* config, SMSavePhase phase ) config->writeEntry( QString("userNoBorder")+n, c->isUserNoBorder() ); config->writeEntry( QString("windowType")+n, windowTypeToTxt( c->windowType())); config->writeEntry( QString("shortcut")+n, c->shortcut().toStringInternal()); - config->writeEntry( QString("stackingOrder")+n, unconstrained_stacking_order.findIndex( c )); + config->writeEntry( QString("stackingOrder")+n, unconstrained_stacking_order.indexOf( c )); } } if( phase == SMSavePhase0 ) @@ -180,7 +180,7 @@ void Workspace::loadSessionInfo() info->windowType = txtToWindowType( config->readEntry( QString("windowType")+n, QString() ).toLatin1()); info->shortcut = config->readEntry( QString("shortcut")+n, QString() ); info->active = ( active_client == i ); - info->stackingOrder = config->readNumEntry( QString("stackingOrder")+n, -1 ); + info->stackingOrder = config->readEntry( QString("stackingOrder")+n, -1 ); } }