From 3f6b179bb3004ee6d5df4e5039e90b7e5c53a8de Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 11 Apr 2009 19:10:28 +0200 Subject: Fixed lineEdits tabs movements (each site, its url..) --- src/mainview.cpp | 10 ++++++++++ src/mainview.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/mainview.cpp b/src/mainview.cpp index c67d70a6..3b5db52e 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -70,6 +70,7 @@ MainView::MainView(QWidget *parent) connect(m_tabBar, SIGNAL(closeOtherTabs(int)), this, SLOT(slotCloseOtherTabs(int))); connect(m_tabBar, SIGNAL(reloadTab(int)), this, SLOT(slotReloadTab(int))); connect(m_tabBar, SIGNAL(reloadAllTabs()), this, SLOT(slotReloadAllTabs())); + connect(m_tabBar, SIGNAL(tabMoved(int,int)), this, SLOT(moveTab(int,int))); // Recently Closed Tab Action m_recentlyClosedTabsMenu = new KMenu(this); @@ -665,3 +666,12 @@ void MainView::previousTab() next = count() - 1; setCurrentIndex(next); } + + +void MainView::moveTab(int fromIndex, int toIndex) +{ + QWidget *lineEdit = m_lineEdits->widget(fromIndex); + m_lineEdits->removeWidget(lineEdit); + m_lineEdits->insertWidget(toIndex, lineEdit); +} + diff --git a/src/mainview.h b/src/mainview.h index 9085aa46..617d81db 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -132,6 +132,8 @@ private slots: private: + void moveTab(int fromIndex, int toIndex); + KAction *m_recentlyClosedTabsAction; KMenu *m_recentlyClosedTabsMenu; -- cgit v1.2.1