diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-06-19 11:30:59 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-25 08:57:36 +0200 |
commit | 3ae9c8c36097abffd73e29cea1b897ca7d704916 (patch) | |
tree | 0657805f357206636bd37b9b95e6d4557ce6473c /src/quick/items/qquicktext_p_p.h | |
parent | 31ba131f9b166ef857f8559a23429d99609e6669 (diff) |
Fix clicking on links in aligned or elided Text.
Adjust the mouse position to compensate for any alignment offsets
and test the elided text layout for anchors if none is found in
the normal layout.
Change-Id: Idfda3f7e372d0f2d6c1b7bb5f22d7015d52e8239
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktext_p_p.h')
-rw-r--r-- | src/quick/items/qquicktext_p_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext_p_p.h b/src/quick/items/qquicktext_p_p.h index 2afcd8f369..985b1e1c80 100644 --- a/src/quick/items/qquicktext_p_p.h +++ b/src/quick/items/qquicktext_p_p.h @@ -166,7 +166,8 @@ public: QRectF setupTextLayout(qreal *const naturalWidth, qreal * const baseline); void setupCustomLineGeometry(QTextLine &line, qreal &height, int lineOffset = 0); bool isLinkActivatedConnected(); - QString anchorAt(const QPointF &pos); + static QString anchorAt(const QTextLayout *layout, const QPointF &mousePos); + QString anchorAt(const QPointF &pos) const; inline qreal lineHeight() const { return extra.isAllocated() ? extra->lineHeight : 1.0; } inline int maximumLineCount() const { return extra.isAllocated() ? extra->maximumLineCount : INT_MAX; } |