diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-07-21 12:09:26 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-07-22 11:07:11 +0000 |
commit | fdbe0f21744a1cc1785cd10346437b03029fe65d (patch) | |
tree | 2aecbc87ba26b095ac8098cbfeaf43bab928409c /src/quick | |
parent | ec1fc3aaa78c2c6a8ed660f26bc2c26b7d0c10bb (diff) |
Replace Qt's MidButton with MiddleButton
The latter has been the preferred name since Qt 4.7.0.
Added a comment on where the old name is exposed to QML that it's only
for backwards compatibility.
Change-Id: I2c5088d597dd7327cc5899d06afb180d0ec2893e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 3debb37250b2c57aaaf81940f9dfeb540fd4e380)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/items/qquicktextcontrol.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquicktextinput.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp index 4c741f67e3..8db2a38b11 100644 --- a/src/quick/items/qquicktextcontrol.cpp +++ b/src/quick/items/qquicktextcontrol.cpp @@ -1192,7 +1192,7 @@ void QQuickTextControlPrivate::mouseReleaseEvent(QMouseEvent *e, const QPointF & #if QT_CONFIG(clipboard) setClipboardSelection(); selectionChanged(true); - } else if (e->button() == Qt::MidButton + } else if (e->button() == Qt::MiddleButton && (interactionFlags & Qt::TextEditable) && QGuiApplication::clipboard()->supportsSelection()) { setCursorPosition(pos); diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp index 06a9f134ac..6275b298ed 100644 --- a/src/quick/items/qquicktextinput.cpp +++ b/src/quick/items/qquicktextinput.cpp @@ -1629,7 +1629,7 @@ void QQuickTextInput::mouseReleaseEvent(QMouseEvent *event) if (QGuiApplication::clipboard()->supportsSelection()) { if (event->button() == Qt::LeftButton) { d->copy(QClipboard::Selection); - } else if (!d->m_readOnly && event->button() == Qt::MidButton) { + } else if (!d->m_readOnly && event->button() == Qt::MiddleButton) { d->deselect(); d->insert(QGuiApplication::clipboard()->text(QClipboard::Selection)); } |