TextEdit: fix construction time text cache
authorJ-P Nurmi <jpnurmi@theqtcompany.com>
Mon, 17 Nov 2014 11:36:30 +0000 (12:36 +0100)
committerJ-P Nurmi <jpnurmi@theqtcompany.com>
Thu, 8 Jan 2015 17:18:15 +0000 (18:18 +0100)
commit5fa4e1d0981cbe52392f474d0297678915bc48f5
treee0e0fd647a9f0e78774a3028f50cf9ee56c12adf
parent5cfe7d2074306a72909ea20718c1c4bebeb27bad
TextEdit: fix construction time text cache

QQuickTextEdit does not apply cached text to the underlying document
until component construction is complete. However, if text() was called
during the construction (eg. because of a binding), it would blindly
overwrite the cached text with (still) empty document content.

Task-number: QTBUG-41583
Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
src/quick/items/qquicktextedit.cpp
tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp