Help: Replace Qt::MidButton by Qt::MiddleButton

Task-number: QTCREATORBUG-24098
Change-Id: I46e06ec1402be345ebd1e4543ed67a726caa42a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2020-08-27 18:19:46 +02:00
parent a79b0c6558
commit 4314795992
5 changed files with 5 additions and 5 deletions

View File

@@ -216,7 +216,7 @@ bool SearchWidget::eventFilter(QObject *o, QEvent *e)
if (!link.isEmpty() || link.isValid()) {
bool controlPressed = me->modifiers() & Qt::ControlModifier;
if ((me->button() == Qt::LeftButton && controlPressed)
|| (me->button() == Qt::MidButton)) {
|| (me->button() == Qt::MiddleButton)) {
emit linkActivated(link, currentSearchTerms(), true/*newPage*/);
}
}

View File

@@ -443,7 +443,7 @@ void TextBrowserHelpWidget::mouseReleaseEvent(QMouseEvent *e)
bool controlPressed = e->modifiers() & Qt::ControlModifier;
const QString link = linkAt(e->pos());
if (m_parent->isActionVisible(HelpViewer::Action::NewPage)
&& (controlPressed || e->button() == Qt::MidButton) && !link.isEmpty()) {
&& (controlPressed || e->button() == Qt::MiddleButton) && !link.isEmpty()) {
emit m_parent->newPageRequested(QUrl(link));
return;
}

View File

@@ -513,7 +513,7 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
QMouseEvent *me = static_cast<QMouseEvent*>(e);
bool controlPressed = me->modifiers() & Qt::ControlModifier;
if (((me->button() == Qt::LeftButton) && controlPressed)
|| (me->button() == Qt::MidButton)) {
|| (me->button() == Qt::MiddleButton)) {
QString data = index.data(Qt::UserRole + 10).toString();
if (!data.isEmpty() && data != QLatin1String("Folder"))
emit createPage(QUrl(data), false);

View File

@@ -107,7 +107,7 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
if (index.isValid() && sm->isSelected(index)) {
if ((button == Qt::LeftButton && (me->modifiers() & Qt::ControlModifier))
|| (button == Qt::MidButton)) {
|| (button == Qt::MiddleButton)) {
QHelpContentItem *itm = m_contentModel->contentItemAt(index);
if (itm)
emit linkActivated(itm->url(), true/*newPage*/);

View File

@@ -178,7 +178,7 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
if (idx.isValid()) {
Qt::MouseButtons button = mouseEvent->button();
if (((button == Qt::LeftButton) && (mouseEvent->modifiers() & Qt::ControlModifier))
|| (button == Qt::MidButton)) {
|| (button == Qt::MiddleButton)) {
open(idx);
}
}