summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstatictext
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-15 12:20:15 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-01-15 12:20:15 (GMT)
commit629b565a697911904558ad0127a240a535489787 (patch)
tree1cfc85b3980c2a86f6dd8abe49a43cbfb3fb977b /tests/auto/qstatictext
parent5ff3ab8f2ddcac57df3f3d9114fe3913659fcee8 (diff)
downloadQt-629b565a697911904558ad0127a240a535489787.zip
Qt-629b565a697911904558ad0127a240a535489787.tar.gz
Qt-629b565a697911904558ad0127a240a535489787.tar.bz2
Remove translationDoesNotCauseRelayout test
This is more suited to be a benchmark, as it doesn't cover the functionality of the class.
Diffstat (limited to 'tests/auto/qstatictext')
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp45
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp
index 66275b2..c41b34b1 100644
--- a/tests/auto/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/qstatictext/tst_qstatictext.cpp
@@ -69,7 +69,6 @@ private slots:
void scaledPainter();
void rotatedScaledAndTranslatedPainter();
void transformationChanged();
- void translationDoesntCauseRelayout();
};
void tst_QStaticText::init()
@@ -351,49 +350,5 @@ void tst_QStaticText::transformationChanged()
QCOMPARE(imageDrawStaticText, imageDrawText);
}
-void tst_QStaticText::translationDoesntCauseRelayout()
-{
- QImage imageDrawText(1000, 1000, QImage::Format_ARGB32_Premultiplied);
- {
- QPainter p(&imageDrawText);
- p.scale(2.0, 2.0);
- p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
-
- p.translate(100, 200);
- p.drawText(0, 0, "Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- }
-
- QImage imageDrawStaticText(1000, 1000, QImage::Format_ARGB32_Premultiplied);
- {
- QPainter p(&imageDrawStaticText);
- p.scale(2.0, 2.0);
- QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(0, 0, text);
-
- QStaticTextPrivate *textd = QStaticTextPrivate::get(&text);
- glyph_t *glyphPool = textd->glyphPool;
- QFixedPoint *positionPool = textd->positionPool;
- QStaticTextItem *items = textd->items;
-
- p.translate(100, 200);
- p.drawStaticText(0, 0, text);
-
- // ###
- // If the layout is recalculated, the data is reallocated. Not a entirely deterministic
- // test, since the memory can be reused.
- QCOMPARE(textd->glyphPool, glyphPool);
- QCOMPARE(textd->positionPool, positionPool);
- QCOMPARE(textd->items, items);
- }
-
-#if defined(DEBUG_SAVE_IMAGE)
- imageDrawText.save("translationDoesntCauseRelayout_imageDrawText.png");
- imageDrawStaticText.save("translationDoesntCauseRelayout_imageDrawStaticText.png");
-#endif
-
- QCOMPARE(imageDrawStaticText, imageDrawText);
-}
-
-
QTEST_MAIN(tst_QStaticText)
#include "tst_qstatictext.moc"