From 2da04aa26b46e945d61f4f7457fcb56d10c8e621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 14 Sep 2015 09:27:48 +0200 Subject: [PATCH] Use auto where we call ensureStackingOrder(client->transients()) Preparation step for switching transients from Client to AbstractClient. --- activities.cpp | 4 ++-- client.cpp | 4 ++-- geometry.cpp | 4 ++-- workspace.cpp | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/activities.cpp b/activities.cpp index fef04d1db2..ab330d7b6f 100644 --- a/activities.cpp +++ b/activities.cpp @@ -105,8 +105,8 @@ void Activities::toggleClientOnActivity(Client* c, const QString &activity, bool //notifyWindowDesktopChanged( c, old_desktop ); - ClientList transients_stacking_order = ws->ensureStackingOrder(c->transients()); - for (ClientList::ConstIterator it = transients_stacking_order.constBegin(); + auto transients_stacking_order = ws->ensureStackingOrder(c->transients()); + for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) toggleClientOnActivity(*it, activity, dont_activate); diff --git a/client.cpp b/client.cpp index 347dcf19e2..c81524b99f 100644 --- a/client.cpp +++ b/client.cpp @@ -1217,8 +1217,8 @@ void Client::doSetDesktop(int desktop, int was_desk) workspace()->updateOnAllDesktopsOfTransients(this); } - ClientList transients_stacking_order = workspace()->ensureStackingOrder(transients()); - for (ClientList::ConstIterator it = transients_stacking_order.constBegin(); + auto transients_stacking_order = workspace()->ensureStackingOrder(transients()); + for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) (*it)->setDesktop(desktop); diff --git a/geometry.cpp b/geometry.cpp index 7c3277bebc..e689e14e4d 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -3411,8 +3411,8 @@ void Client::sendToScreen(int newScreen) if (qtMode != QuickTileNone && qtMode != quick_tile_mode) setQuickTileMode(qtMode, true); - ClientList tso = workspace()->ensureStackingOrder(transients()); - for (ClientList::ConstIterator it = tso.constBegin(), end = tso.constEnd(); it != end; ++it) + auto tso = workspace()->ensureStackingOrder(transients()); + for (auto it = tso.constBegin(), end = tso.constEnd(); it != end; ++it) (*it)->sendToScreen(newScreen); } diff --git a/workspace.cpp b/workspace.cpp index 71b8854228..e10ee07a50 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1144,8 +1144,8 @@ void Workspace::sendClientToDesktop(AbstractClient* c, int desk, bool dont_activ if (Client *client = dynamic_cast(c)) { // TODO: adjust transients for non-X11 - ClientList transients_stacking_order = ensureStackingOrder(client->transients()); - for (ClientList::ConstIterator it = transients_stacking_order.constBegin(); + auto transients_stacking_order = ensureStackingOrder(client->transients()); + for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) sendClientToDesktop(*it, desk, dont_activate);