don't use const_iterator's when calling non const functions

BUG: 282933
FIXED-IN: 4.7.4
This commit is contained in:
Thomas Lübking 2011-11-01 21:20:31 +01:00
parent 6a94ff5641
commit 4cd4481663

View file

@ -520,9 +520,7 @@ Workspace::~Workspace()
// TODO: grabXServer(); // TODO: grabXServer();
// Use stacking_order, so that kwin --replace keeps stacking order // Use stacking_order, so that kwin --replace keeps stacking order
for (ClientList::ConstIterator it = stacking_order.constBegin(); for (ClientList::iterator it = stacking_order.begin(), end = stacking_order.end(); it != end; ++it) {
it != stacking_order.constEnd();
++it) {
// Only release the window // Only release the window
(*it)->releaseWindow(true); (*it)->releaseWindow(true);
// No removeClient() is called, it does more than just removing. // No removeClient() is called, it does more than just removing.
@ -531,9 +529,7 @@ Workspace::~Workspace()
clients.removeAll(*it); clients.removeAll(*it);
desktops.removeAll(*it); desktops.removeAll(*it);
} }
for (UnmanagedList::ConstIterator it = unmanaged.constBegin(); for (UnmanagedList::iterator it = unmanaged.begin(), end = unmanaged.end(); it != end; ++it)
it != unmanaged.constEnd();
++it)
(*it)->release(); (*it)->release();
#ifdef KWIN_BUILD_DESKTOPCHANGEOSD #ifdef KWIN_BUILD_DESKTOPCHANGEOSD
delete desktop_change_osd; delete desktop_change_osd;