aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextcontrol.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-12-13 15:42:49 +1000
committerQt by Nokia <qt-info@nokia.com>2011-12-15 09:08:35 +0100
commit54fad1bb8d7b3e249926e088b424085c9336d784 (patch)
tree9397c54d5ffdde6be174a90b4e9d1b21a3ef9741 /src/quick/items/qquicktextcontrol.cpp
parentd8da1372ae23f31bdfe465623d9646bb81008e16 (diff)
Activate links in a read only TextEdit.
Don't ignore mouse press events if the LinksAccessibleByMouse interaction flag is set. Task-number: QTBUG-23065 Change-Id: I25b3e3b0cf194b71fc863ed239196a567f42c19c Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextcontrol.cpp')
-rw-r--r--src/quick/items/qquicktextcontrol.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/quick/items/qquicktextcontrol.cpp b/src/quick/items/qquicktextcontrol.cpp
index f50e70a74e..90483e5831 100644
--- a/src/quick/items/qquicktextcontrol.cpp
+++ b/src/quick/items/qquicktextcontrol.cpp
@@ -1187,10 +1187,13 @@ void QQuickTextControlPrivate::mousePressEvent(QMouseEvent *e, const QPointF &po
cursor.clearSelection();
}
}
- if (!(e->button() & Qt::LeftButton) ||
- !((interactionFlags & Qt::TextSelectableByMouse) || (interactionFlags & Qt::TextEditable))) {
+ if (!(e->button() & Qt::LeftButton)) {
+ e->ignore();
+ return;
+ } else if (!(interactionFlags & (Qt::TextSelectableByMouse | Qt::TextEditable))) {
+ if (!(interactionFlags & Qt::LinksAccessibleByMouse))
e->ignore();
- return;
+ return;
}
cursorIsFocusIndicator = false;