summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-09-22 15:45:18 +0200
committermegabigbug <megabigbug@arrakis.(none)>2009-09-22 15:45:18 +0200
commitc64f84da6627ecd09d74f1e0ff2aa62f47a30c60 (patch)
tree25620771556c019b808332f074aa9816fe08d828 /src/tabbar.cpp
parentsmall fix of tab preview behavior (diff)
parentFixing foreach macros.. (diff)
downloadrekonq-c64f84da6627ecd09d74f1e0ff2aa62f47a30c60.tar.xz
Merge branch 'master' of git://gitorious.org/rekonq/mainline
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index d676af55..dfc1482c 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -73,7 +73,17 @@ TabBar::~TabBar()
void TabBar::postLaunch()
{
- m_addTabButton->setDefaultAction(Application::instance()->mainWindow()->actionByName("new_tab"));
+ // Find the correct MainWindow of this tab button
+ MainWindowList list = Application::instance()->mainWindowList();
+ Q_FOREACH(QPointer<MainWindow> w, list)
+ {
+ if (w->isAncestorOf(this))
+ {
+ m_addTabButton->setDefaultAction(w->actionByName("new_tab"));
+ break;
+ }
+ }
+
m_addTabButton->setAutoRaise(true);
m_addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_addTabButton->show();