summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp')
-rw-r--r--Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp b/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp
index 2c064f8..fb41446 100644
--- a/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp
+++ b/Swift/QtUI/QtChatTabsShortcutOnlySubstitute.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -64,14 +64,14 @@ void QtChatTabsShortcutOnlySubstitute::handleRequestedActiveTab() {
QList<QtTabbable*> tabs = tabbableWindows();
- for (int j = 0; j < 2; j++) {
+ for (auto& type : types) {
int startIndex = tabs.indexOf(senderTab);
int currentIndex = startIndex;
do {
currentIndex = (currentIndex + 1) % tabs.size();
QtTabbable* currentTab = tabs.at(currentIndex);
- if (currentTab->getWidgetAlertState() == types[j]) {
+ if (currentTab->getWidgetAlertState() == type) {
currentTab->activateWindow();
return;
}