summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 3f3faabc..dfc1482c 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -75,14 +75,13 @@ void TabBar::postLaunch()
{
// Find the correct MainWindow of this tab button
MainWindowList list = Application::instance()->mainWindowList();
- MainWindow *window;
- foreach (window, list)
+ Q_FOREACH(QPointer<MainWindow> w, list)
{
- if (window->isAncestorOf(this))
- {
- m_addTabButton->setDefaultAction(window->actionByName("new_tab"));
- break;
- }
+ if (w->isAncestorOf(this))
+ {
+ m_addTabButton->setDefaultAction(w->actionByName("new_tab"));
+ break;
+ }
}
m_addTabButton->setAutoRaise(true);