mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
fixed TODO:
Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
This commit is contained in:
parent
32b51b7b92
commit
b111b1482a
|
@ -538,8 +538,7 @@ bool KItemListController::mousePressEvent(QGraphicsSceneMouseEvent* event, const
|
||||||
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
|
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
|
||||||
emit mouseButtonPressed(m_pressedIndex, event->buttons());
|
emit mouseButtonPressed(m_pressedIndex, event->buttons());
|
||||||
|
|
||||||
// TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
|
if (event->buttons() & (Qt::BackButton | Qt::ForwardButton)) {
|
||||||
if (event->buttons() & (Qt::XButton1 | Qt::XButton2)) {
|
|
||||||
// Do not select items when clicking the back/forward buttons, see
|
// Do not select items when clicking the back/forward buttons, see
|
||||||
// https://bugs.kde.org/show_bug.cgi?id=327412.
|
// https://bugs.kde.org/show_bug.cgi?id=327412.
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1084,10 +1084,9 @@ void DolphinView::slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons
|
||||||
|
|
||||||
hideToolTip();
|
hideToolTip();
|
||||||
|
|
||||||
// TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
|
if (buttons & Qt::BackButton) {
|
||||||
if (buttons & Qt::XButton1) {
|
|
||||||
emit goBackRequested();
|
emit goBackRequested();
|
||||||
} else if (buttons & Qt::XButton2) {
|
} else if (buttons & Qt::ForwardButton) {
|
||||||
emit goForwardRequested();
|
emit goForwardRequested();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue