summaryrefslogtreecommitdiff
path: root/src/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-05-17 23:43:12 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-05-17 23:43:12 +0200
commit2654b81959bcef9caa8d39850290bf80ec6a48f8 (patch)
tree77407aff66c86c4516200b6c22b19a34bdff3ac1 /src/tabbar.cpp
parentOpen source code by loading the page HTML instead of requesting (another time... (diff)
downloadrekonq-2654b81959bcef9caa8d39850290bf80ec6a48f8.tar.xz
connects tabMoved signal of TabBar to tabsChanged signal of MainView,
so any changes in tab order due to dragging tabs are saved in the sessions file using SessionManager. So now the changes in the order of tabs is correctly remembered during restore. Patch by Tirtha Chatterjee Reviewed by me ;)
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r--src/tabbar.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 1ab357f2..d2e0ff17 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -87,6 +87,7 @@ TabBar::TabBar(QWidget *parent)
connect(this, SIGNAL(contextMenu(int, const QPoint &)), this, SLOT(contextMenu(int, const QPoint &)));
connect(this, SIGNAL(emptyAreaContextMenu(const QPoint &)), this, SLOT(emptyAreaContextMenu(const QPoint &)));
+ connect(this, SIGNAL(tabMoved(int,int)), this, SLOT(tabMoved(int,int)));
connect(m_animationMapper, SIGNAL(mapped(int)), this, SLOT(removeAnimation(int)));
setGraphicsEffect(m_tabHighlightEffect);
@@ -303,6 +304,13 @@ void TabBar::mousePressEvent(QMouseEvent *event)
}
+void TabBar::tabMoved(int, int)
+{
+ MainView *mv = qobject_cast<MainView *>(parent());
+ QTimer::singleShot(200, mv, SIGNAL(tabsChanged()));
+}
+
+
void TabBar::contextMenu(int tab, const QPoint &pos)
{
setupHistoryActions();