From d8ee217d41b8c558013c624b15e99f2b8794e8c6 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Sat, 7 Feb 2015 21:19:15 +0100 Subject: 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 --- tests/auto/quick/qquicktext/tst_qquicktext.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/auto/quick') 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."); - QVERIFY(textPrivate->visibleImgTags.count() == 1); + QVERIFY(textPrivate->extra->visibleImgTags.count() == 1); QVERIFY(spy.count() == 1); myText->setMaximumLineCount(2); myText->setText("This is another heart."); - 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. -- cgit v1.2.3