From 1cc58fdf174656a52603af00cb40478066c5abd4 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Wed, 1 Jun 2011 09:45:55 +0200 Subject: Make QSGTextNode back-end for QML's TextInput and TextEdit Use the general QSGTextNode class as back-end for all text elements in QML to make all text elements look the same and use the same text rasterization back-end. This requires a few rewrites in the text node to support e.g. selections. Crashes seen with threaded renderer in TextEdit and TextInput on Mac are also fixed by this. Reviewed-by: Jiang Jiang Task-number: QTBUG-18019, QTBUG-20017 Change-Id: I4207faf180c83422e5f8b726741321af395bd724 Reviewed-on: http://codereview.qt.nokia.com/2865 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/declarative/items/qsgtext_p_p.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/declarative/items/qsgtext_p_p.h') diff --git a/src/declarative/items/qsgtext_p_p.h b/src/declarative/items/qsgtext_p_p.h index 050e3984ab..40c986142c 100644 --- a/src/declarative/items/qsgtext_p_p.h +++ b/src/declarative/items/qsgtext_p_p.h @@ -134,7 +134,6 @@ public: QPixmap textLayoutImage(bool drawStyle); void drawTextLayout(QPainter *p, const QPointF &pos, bool drawStyle); QTextLayout layout; - QThread *layoutThread; static QPixmap drawOutline(const QPixmap &source, const QPixmap &styleSource); static QPixmap drawOutline(const QPixmap &source, const QPixmap &styleSource, int yOffset); @@ -146,9 +145,13 @@ public: enum NodeType { NodeIsNull, NodeIsTexture, - NodeIsText, + NodeIsText }; NodeType nodeType; + +#if defined(Q_OS_MAC) + QThread *layoutThread; +#endif }; QT_END_NAMESPACE -- cgit v1.2.3