mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-24 04:36:34 +01: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:
parent
14f88fb46c
commit
c85f4f8894
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user