Replace Qt foreach with C++ foreach
ClosedPublic

Authored by ghost46 on Oct 16 2018, 1:29 AM.

Details

Summary

This replaces three Qt foreach loops I found in the tabwidget with C++ foreach loops. There were already newer foreach loops near the bottom, so this makes things consistent in the entire file.

Diff Detail

Repository
R875 Falkon
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ghost46 created this revision.Oct 16 2018, 1:29 AM
Restricted Application added a subscriber: falkon. · View Herald TranscriptOct 16 2018, 1:29 AM
ghost46 requested review of this revision.Oct 16 2018, 1:29 AM
drosca requested changes to this revision.Oct 23 2018, 3:40 PM

You should always use for on const Qt containers, as otherwise it will detach.
So it should be:

const auto tabs = allTabs(false);
for (WebTab *tab : tabs) {
...
}
This revision now requires changes to proceed.Oct 23 2018, 3:40 PM

Made the required changes.

drosca accepted this revision.Oct 24 2018, 3:16 PM
This revision is now accepted and ready to land.Oct 24 2018, 3:16 PM
This revision was automatically updated to reflect the committed changes.