Commit fd2925cd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port away from deprecated Qt::MidButton

parent 9eeb270f
......@@ -67,7 +67,7 @@ void KonqSidebarHistoryModule::slotCurViewUrlChanged(const QUrl& url)
// LMB activation (single or double click) handling
void KonqSidebarHistoryModule::slotActivated(const QModelIndex &index)
{
if (m_lastPressedButtons == Qt::MidButton) { // already handled by slotClicked
if (m_lastPressedButtons == Qt::MiddleButton) { // already handled by slotClicked
return;
}
const QUrl url = m_historyView->urlForIndex(index);
......@@ -100,7 +100,7 @@ void KonqSidebarHistoryModule::slotPressed(const QModelIndex &index)
// MMB handling
void KonqSidebarHistoryModule::slotClicked(const QModelIndex &index)
{
if (m_lastPressedButtons & Qt::MidButton) {
if (m_lastPressedButtons & Qt::MiddleButton) {
const QUrl url = m_historyView->urlForIndex(index);
if (url.isValid()) {
createNewWindow(url);
......
......@@ -56,7 +56,7 @@ void KonqSideBarPlacesModule::slotPlaceUrlChanged(const QUrl &url)
const Qt::MouseButtons buttons = QGuiApplication::mouseButtons();
const Qt::KeyboardModifiers modifiers = QGuiApplication::keyboardModifiers();
if ((buttons & Qt::MidButton) != 0 || (modifiers & Qt::ControlModifier) != 0) {
if ((buttons & Qt::MiddleButton) != 0 || (modifiers & Qt::ControlModifier) != 0) {
emit createNewWindow(url);
} else {
emit openUrlRequest(url);
......
......@@ -539,7 +539,7 @@ void KonqSidebarTree::slotMouseButtonClicked(int _button, Q3ListViewItem *_item,
case Qt::LeftButton:
slotExecuted(item);
break;
case Qt::MidButton:
case Qt::MiddleButton:
item->middleButtonClicked();
break;
}
......
......@@ -241,7 +241,7 @@ bool KHTMLSideBar::urlSelected(const QString &url, int button,
}
return true;
}
if (button == Qt::MidButton) {
if (button == Qt::MiddleButton) {
emit openUrlNewWindow(completeURL(url).url(),
args);
return true;
......
......@@ -2765,7 +2765,7 @@ void KonqMainWindow::slotUp()
const QUrl &url = m_currentView->upUrl();
if (goKeyboardState & Qt::ControlModifier) {
openFilteredUrl(url.url(), req);
} else if (goMouseState & Qt::MidButton) {
} else if (goMouseState & Qt::MiddleButton) {
if (KonqSettings::mmbOpensTab()) {
openFilteredUrl(url.url(), req);
} else {
......@@ -2811,7 +2811,7 @@ void KonqMainWindow::slotGoHistoryDelayed()
if (newView && inFront) {
m_pViewManager->showTab(newView);
}
} else if (m_goMouseState & Qt::MidButton) {
} else if (m_goMouseState & Qt::MiddleButton) {
if (mmbOpensTab) {
KonqView *newView = m_pViewManager->addTabFromHistory(m_currentView, m_goBuffer, openAfterCurrentPage);
if (newView && inFront) {
......@@ -3904,7 +3904,7 @@ void KonqExtendedBookmarkOwner::openBookmark(const KBookmark &bm, Qt::MouseButto
if (km & Qt::ControlModifier) { // Ctrl Left/MMB
m_pKonqMainWindow->openFilteredUrl(url, req);
} else if (mb & Qt::MidButton) {
} else if (mb & Qt::MiddleButton) {
if (KonqSettings::mmbOpensTab()) {
m_pKonqMainWindow->openFilteredUrl(url, req);
} else {
......
......@@ -622,7 +622,7 @@ bool KonqFrameTabs::eventFilter(QObject *watched, QEvent *event)
(event->type() == QEvent::MouseButtonPress ||
event->type() == QEvent::MouseButtonRelease)) {
QMouseEvent *e = static_cast<QMouseEvent *>(event);
if (e->button() == Qt::MidButton) {
if (e->button() == Qt::MiddleButton) {
if (event->type() == QEvent::MouseButtonRelease) {
const int index = bar->tabAt(e->pos());
slotCloseRequest(index);
......
......@@ -434,7 +434,7 @@ void KTabWidget::mousePressEvent(QMouseEvent *event)
void KTabWidget::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::MidButton) {
if (event->button() == Qt::MiddleButton) {
if (d->isEmptyTabbarSpace(event->pos())) {
emit(mouseMiddleClick());
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment