diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2012-07-05 10:18:43 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-09 09:05:32 +0200 |
commit | 4598939ee2fad1238609ca43717199fd4e98c75f (patch) | |
tree | 9ffdcf451ad585f14b1eda8050e48d3298dec7f2 /src/quick/items/qquicktextedit_p_p.h | |
parent | 19c0a31319148d4ac716f7cb3295891b5a3b20d9 (diff) |
Speed up TextEdit construction time.
Defer setting content on the QTextDocument until componentComplete()
to avoid unnecessary layouts and move one time setup for the
text document from setContent to the constructor.
Reduces the construction time of a TextEdit with RichText textFormat
by about a third.
Change-Id: Idde0772063bf769cde984efddd68589c55a7431a
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktextedit_p_p.h')
-rw-r--r-- | src/quick/items/qquicktextedit_p_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquicktextedit_p_p.h b/src/quick/items/qquicktextedit_p_p.h index 1fb82110ea..6e15736b0b 100644 --- a/src/quick/items/qquicktextedit_p_p.h +++ b/src/quick/items/qquicktextedit_p_p.h @@ -82,7 +82,7 @@ public: , documentDirty(true), dirty(false), richText(false), cursorVisible(false), cursorPending(false) , focusOnPress(true), persistentSelection(false), requireImplicitWidth(false) , selectByMouse(false), canPaste(false), canPasteValid(false), hAlignImplicit(true) - , textCached(false), inLayout(false) + , textCached(true), inLayout(false) { } |