summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qdeclarativetext_p_p.h
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-04 07:33:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-04 07:33:16 (GMT)
commite4c41d50955fead0efb03893571c7fcb89c8fe32 (patch)
tree192316696acdd2ff3bfda21b46e2d071f3d85b73 /src/declarative/graphicsitems/qdeclarativetext_p_p.h
parent8cbc34de67d52d5923b3a70bf84aadfe3aa94f24 (diff)
parentf25391e52af3eef68abfa3941fc48da0c52bb010 (diff)
downloadQt-e4c41d50955fead0efb03893571c7fcb89c8fe32.zip
Qt-e4c41d50955fead0efb03893571c7fcb89c8fe32.tar.gz
Qt-e4c41d50955fead0efb03893571c7fcb89c8fe32.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: Improve test coverage for declarative module. Avoid potential null dereference. Add autotest for reserved words in QML. Prevent crash in XmlListModel when appending an empty role. Remove unused, unexported class. Fix clipping behavior for non-cached text. Compile Only cache textlayout in paint engines that support transformations QmlDebugService: Fix compiler warning about cast from ascii Qt.openUrlExternally should resolve relative URLs. Doc: add missing image. Doc: typographical and spelling errors. Doc: remove unfinished and confusing mention to focus panels. Apply the QStaticText text-caching strategy for QML Documentation: input to Qt.rgba should be from 0-1, not 0-255.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetext_p_p.h')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext_p_p.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
index 48552a7..db68558 100644
--- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
@@ -55,6 +55,7 @@
#include "qdeclarativeitem.h"
#include "private/qdeclarativeitem_p.h"
+#include "private/qdeclarativetextlayout_p.h"
#include <qdeclarative.h>
@@ -69,18 +70,7 @@ class QDeclarativeTextPrivate : public QDeclarativeItemPrivate
{
Q_DECLARE_PUBLIC(QDeclarativeText)
public:
- QDeclarativeTextPrivate()
- : color((QRgb)0), style(QDeclarativeText::Normal),
- hAlign(QDeclarativeText::AlignLeft), vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
- imgDirty(true), dirty(true), richText(false), singleline(false), cache(true), internalWidthUpdate(false), doc(0),
- format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap)
- {
-#if defined(QML_NO_TEXT_CACHE)
- cache = false;
-#endif
- QGraphicsItemPrivate::acceptedMouseButtons = Qt::LeftButton;
- QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents;
- }
+ QDeclarativeTextPrivate();
~QDeclarativeTextPrivate();
@@ -101,7 +91,7 @@ public:
QPixmap wrappedTextImage(bool drawStyle);
void drawWrappedText(QPainter *p, const QPointF &pos, bool drawStyle);
QPixmap richTextImage(bool drawStyle);
- QSize setupTextLayout(QTextLayout *layout);
+ QSize setupTextLayout();
QString text;
QFont font;
@@ -121,7 +111,7 @@ public:
bool cache:1;
bool internalWidthUpdate:1;
QTextDocumentWithImageResources *doc;
- QTextLayout layout;
+ QDeclarativeTextLayout layout;
QSize cachedLayoutSize;
QDeclarativeText::TextFormat format;
QDeclarativeText::WrapMode wrapMode;