From b842968e4aa23332fb29687ee52611716b0b321c Mon Sep 17 00:00:00 2001 From: Frank Reininghaus Date: Wed, 15 Apr 2009 21:50:50 +0000 Subject: Make Qt 4.5's new "move tab" feature work in Dolphin. Up to now, tabs could be moved in the tab bar using drag&drop, but DolphinMainWindow didn't notice :-( Note that there's no need to call setActiveTab() because the active tab is the same before and after the move operation - only its index in the tab bar has changed. BUG: 189641 svn path=/trunk/KDE/kdebase/apps/; revision=954556 --- src/dolphinmainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/dolphinmainwindow.cpp') diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index e60d7662e..ba3ae2787 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -960,6 +960,12 @@ void DolphinMainWindow::searchItems(const KUrl& url) m_activeViewContainer->setUrl(url); } +void DolphinMainWindow::slotTabMoved(int from, int to) +{ + m_viewTab.move(from, to); + m_tabIndex = m_tabBar->currentIndex(); +} + void DolphinMainWindow::init() { DolphinSettings& settings = DolphinSettings::instance(); @@ -1016,6 +1022,8 @@ void DolphinMainWindow::init() this, SLOT(slotWheelMoved(int))); connect(m_tabBar, SIGNAL(mouseMiddleClick(int)), this, SLOT(closeTab(int))); + connect(m_tabBar, SIGNAL(tabMoved(int, int)), + this, SLOT(slotTabMoved(int, int))); m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open -- cgit v1.3