diff options
author | Robin Burchell <robin.burchell@viroteck.net> | 2015-02-07 21:19:15 +0100 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-02-12 17:21:19 +0000 |
commit | d8ee217d41b8c558013c624b15e99f2b8794e8c6 (patch) | |
tree | 4464033f09144e470bb3db44207dc36617c9a4be /tests/auto/quick/qquicktext | |
parent | e4132ab7d178a8d9adb28d1c9b984f396a856557 (diff) |
QQuickText: Decrease the size of QQuickTextPrivate by moving image tags to ExtraData.
Given that other data about images is already stored there (e.g.
nbActiveDownloads), it seems curious to not store it all there.
On x86_64, this drops the size of QQuickTextPrivate by 16 bytes (512 -> 496),
and increases the size of ExtraData from 56 bytes to 72 bytes.
Change-Id: Ib0a98199a74f757cf439d4ba276c7704504055b2
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'tests/auto/quick/qquicktext')
-rw-r--r-- | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp index ae1fd49970..9a7f15c953 100644 --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp @@ -2871,7 +2871,7 @@ void tst_qquicktext::imgTagsMultipleImages() QQuickTextPrivate *textPrivate = QQuickTextPrivate::get(textObject); QVERIFY(textPrivate != 0); - QVERIFY(textPrivate->visibleImgTags.count() == 2); + QVERIFY(textPrivate->extra->visibleImgTags.count() == 2); delete textObject; } @@ -2884,9 +2884,9 @@ void tst_qquicktext::imgTagsElide() QQuickTextPrivate *textPrivate = QQuickTextPrivate::get(myText); QVERIFY(textPrivate != 0); - QVERIFY(textPrivate->visibleImgTags.count() == 0); + QVERIFY(textPrivate->extra->visibleImgTags.count() == 0); myText->setMaximumLineCount(20); - QTRY_VERIFY(textPrivate->visibleImgTags.count() == 1); + QTRY_VERIFY(textPrivate->extra->visibleImgTags.count() == 1); delete myText; delete window; @@ -2904,12 +2904,12 @@ void tst_qquicktext::imgTagsUpdates() QVERIFY(textPrivate != 0); myText->setText("This is a heart<img src=\"images/heart200.png\">."); - QVERIFY(textPrivate->visibleImgTags.count() == 1); + QVERIFY(textPrivate->extra->visibleImgTags.count() == 1); QVERIFY(spy.count() == 1); myText->setMaximumLineCount(2); myText->setText("This is another heart<img src=\"images/heart200.png\">."); - QTRY_VERIFY(textPrivate->visibleImgTags.count() == 1); + QTRY_VERIFY(textPrivate->extra->visibleImgTags.count() == 1); // if maximumLineCount is set and the img tag doesn't have an explicit size // we relayout twice. |