X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6a0898178cca75c5808620d8bc1ea932a406f5fe..b9f1ebca009cb3da36ebc3d4537aedcc69770077:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 077005c0f..92c0cfc80 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -266,15 +266,12 @@ void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection) emit selectionChanged(selection); } -void DolphinMainWindow::slotWheelMoved(int wheeldelta) -{ - if (wheeldelta > 0) - { - //Non-negative, wheel is going forwards, so the tab goes backwards (focuses left) - activatePrevTab(); - } else - { - activateNextTab(); +void DolphinMainWindow::slotWheelMoved(int wheelDelta) +{ + if (wheelDelta > 0) { + activatePrevTab(); + } else { + activateNextTab(); } } @@ -908,9 +905,9 @@ void DolphinMainWindow::init() this, SLOT(openNewTab())); connect(m_tabBar, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)), this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&))); - connect(m_tabBar, SIGNAL(wheelDelta(int)), + connect(m_tabBar, SIGNAL(wheelDelta(int)), this, SLOT(slotWheelMoved(int))); - + m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open QWidget* centralWidget = new QWidget(this); @@ -1346,6 +1343,10 @@ QString DolphinMainWindow::tabName(const KUrl& url) const name = url.fileName(); if (name.isEmpty()) { name = url.protocol(); + } else { + // Make sure that a '&' inside the directory name is displayed correctly + // and not misinterpreted as a keyboard shortcut in QTabBar::setTabText() + name.replace('&', "&&"); } } return name;