Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
m_pressedIndex = m_view->itemAt(m_pressedMousePos);
emit mouseButtonPressed(m_pressedIndex, event->buttons());
- // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
- if (event->buttons() & (Qt::XButton1 | Qt::XButton2)) {
+ if (event->buttons() & (Qt::BackButton | Qt::ForwardButton)) {
// Do not select items when clicking the back/forward buttons, see
// https://bugs.kde.org/show_bug.cgi?id=327412.
return true;
hideToolTip();
- // TODO: Qt5: Replace Qt::XButton1 by Qt::BackButton and Qt::XButton2 by Qt::ForwardButton
- if (buttons & Qt::XButton1) {
+ if (buttons & Qt::BackButton) {
emit goBackRequested();
- } else if (buttons & Qt::XButton2) {
+ } else if (buttons & Qt::ForwardButton) {
emit goForwardRequested();
}
}