Use auto for iterator over transients()

Preparation for changing transients to QList<AbstractClient>.
This commit is contained in:
Martin Gräßlin 2015-09-11 14:23:32 +02:00
parent df98e3883f
commit a5d3317645
2 changed files with 6 additions and 6 deletions

View file

@ -346,7 +346,7 @@ void Workspace::updateMinimizedOfTransients(Client* c)
{
// if mainwindow is minimized or shaded, minimize transients too
if (c->isMinimized()) {
for (ClientList::ConstIterator it = c->transients().constBegin();
for (auto it = c->transients().constBegin();
it != c->transients().constEnd();
++it) {
if ((*it)->isModal())
@ -363,7 +363,7 @@ void Workspace::updateMinimizedOfTransients(Client* c)
}
} else {
// else unmiminize the transients
for (ClientList::ConstIterator it = c->transients().constBegin();
for (auto it = c->transients().constBegin();
it != c->transients().constEnd();
++it) {
if ((*it)->isMinimized()) {
@ -384,7 +384,7 @@ void Workspace::updateMinimizedOfTransients(Client* c)
*/
void Workspace::updateOnAllDesktopsOfTransients(Client* c)
{
for (ClientList::ConstIterator it = c->transients().constBegin();
for (auto it = c->transients().constBegin();
it != c->transients().constEnd();
++it) {
if ((*it)->isOnAllDesktops() != c->isOnAllDesktops())
@ -876,7 +876,7 @@ bool Client::hasTransientInternal(const Client* cl, bool indirect, ConstClientLi
if (set.contains(this))
return false;
set.append(this);
for (ClientList::ConstIterator it = transients().constBegin();
for (auto it = transients().constBegin();
it != transients().constEnd();
++it)
if ((*it)->hasTransientInternal(cl, indirect, set))
@ -910,7 +910,7 @@ ClientList Client::allMainClients() const
AbstractClient* Client::findModal(bool allow_itself)
{
for (ClientList::ConstIterator it = transients().constBegin();
for (auto it = transients().constBegin();
it != transients().constEnd();
++it)
if (AbstractClient* ret = (*it)->findModal(true))

View file

@ -853,7 +853,7 @@ void Client::updateLayer()
return;
StackingUpdatesBlocker blocker(workspace());
invalidateLayer(); // invalidate, will be updated when doing restacking
for (ClientList::ConstIterator it = transients().constBegin(),
for (auto it = transients().constBegin(),
end = transients().constEnd(); it != end; ++it)
(*it)->updateLayer();
}