1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 17:52:10 +02:00

Replace Qt foreach with C++ foreach

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.

Reviewers: drosca

Reviewed By: drosca

Subscribers: falkon

Tags: #falkon

Differential Revision: https://phabricator.kde.org/D16238
This commit is contained in:
Patrick Flynn 2018-10-24 17:16:58 +02:00 committed by David Rosca
parent 14f88fb46c
commit c85f4f8894
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -610,7 +610,8 @@ void TabWidget::closeAllButCurrent(int index)
WebTab* akt = weTab(index);
foreach (WebTab* tab, allTabs(false)) {
const auto tabs = allTabs(false);
for (const WebTab* tab : tabs) {
int tabIndex = tab->tabIndex();
if (akt == widget(tabIndex)) {
continue;
@ -625,7 +626,8 @@ void TabWidget::closeToRight(int index)
return;
}
foreach (WebTab* tab, allTabs(false)) {
const auto tabs = allTabs(false);
for (const WebTab* tab : tabs) {
int tabIndex = tab->tabIndex();
if (index >= tabIndex) {
continue;
@ -641,7 +643,8 @@ void TabWidget::closeToLeft(int index)
return;
}
foreach (WebTab* tab, allTabs(false)) {
const auto tabs = allTabs(false);
for (const WebTab* tab : tabs) {
int tabIndex = tab->tabIndex();
if (index <= tabIndex) {
continue;