diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-10 13:16:24 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-10 13:16:24 (GMT) |
commit | 2e8d090fa6813a2e37c9ed27d69bc3fc99a7ae35 (patch) | |
tree | eaf54ffe4e8a90b8ba1fe03855ab3f0808b012e8 /tests/auto/qstatictext | |
parent | 8032423bb8fa91c623ece61bff528adfd49e8685 (diff) | |
download | Qt-2e8d090fa6813a2e37c9ed27d69bc3fc99a7ae35.zip Qt-2e8d090fa6813a2e37c9ed27d69bc3fc99a7ae35.tar.gz Qt-2e8d090fa6813a2e37c9ed27d69bc3fc99a7ae35.tar.bz2 |
Make QStaticText public API again
QStaticText was previously made private API to support inclusion in
Qt 4.6.x. This change turns it back into public API for Qt 4.7.0.
Diffstat (limited to 'tests/auto/qstatictext')
-rw-r--r-- | tests/auto/qstatictext/tst_qstatictext.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp index 9e4b540..92c0008 100644 --- a/tests/auto/qstatictext/tst_qstatictext.cpp +++ b/tests/auto/qstatictext/tst_qstatictext.cpp @@ -46,9 +46,8 @@ #include <QtOpenGl/QGLWidget> +#include <qstatictext.h> #include <private/qstatictext_p.h> -#include <private/qstatictext_p_p.h> -#include <private/qpainter_p.h> // #define DEBUG_SAVE_IMAGE @@ -120,7 +119,7 @@ void tst_QStaticText::drawToPoint() QPainter p(&imageDrawStaticText); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); text.setUseBackendOptimizations(useBackendOptimizations); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -151,7 +150,7 @@ void tst_QStaticText::drawToRect() QPainter p(&imageDrawStaticText); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", QSizeF(10, 500)); text.setUseBackendOptimizations(useBackendOptimizations); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -178,7 +177,7 @@ void tst_QStaticText::prepareToCorrectData() p.setTransform(transform); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); text.prepare(transform, p.font()); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -203,7 +202,7 @@ void tst_QStaticText::prepareToWrongData() QPainter p(&imageDrawStaticText); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); text.prepare(transform, p.font()); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -234,9 +233,10 @@ void tst_QStaticText::setFont() QStaticText text; text.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(0, 0), text); + p.drawStaticText(0, 0, text); + p.setFont(font); - qt_draw_static_text(&p, QPointF(11, 120), text); + p.drawStaticText(11, 120, text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -257,7 +257,7 @@ void tst_QStaticText::setMaximumSize() QPainter p(&imageDrawStaticText); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); text.setMaximumSize(QSizeF(10, 500)); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -281,7 +281,7 @@ void tst_QStaticText::translatedPainter() p.translate(100, 200); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -304,7 +304,7 @@ void tst_QStaticText::rotatedPainter() QPainter p(&imageDrawStaticText); p.rotate(30.0); - qt_draw_static_text(&p, QPointF(0, 0), text); + p.drawStaticText(QPoint(0, 0), text); } #if defined(DEBUG_SAVE_IMAGE) @@ -333,7 +333,7 @@ void tst_QStaticText::scaledPainter() p.scale(2.0, 0.2); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -360,7 +360,7 @@ void tst_QStaticText::projectedPainter() p.setTransform(transform); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } QCOMPARE(imageDrawStaticText, imageDrawText); @@ -389,7 +389,7 @@ void tst_QStaticText::rotatedScaledAndTranslatedPainter() p.translate(100, 200); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(11, 12), text); + p.drawStaticText(QPointF(11, 12), text); } #if defined(DEBUG_SAVE_IMAGE) @@ -423,10 +423,10 @@ void tst_QStaticText::transformationChanged() p.scale(0.5, 0.7); QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit."); - qt_draw_static_text(&p, QPointF(0, 0), text); + p.drawStaticText(QPointF(0, 0), text); p.scale(7.0, 5.0); - qt_draw_static_text(&p, QPointF(0, 0), text); + p.drawStaticText(QPointF(0, 0), text); } #if defined(DEBUG_SAVE_IMAGE) @@ -462,7 +462,7 @@ public: switch (m_paintEventType) { case NormalDrawStaticText: case DrawStaticTextWithCaching: - qt_draw_static_text(&painter, QPointF(11, 12), m_staticText); + painter.drawStaticText(QPointF(11, 12), m_staticText); break; case NormalDrawText: painter.drawText(11, 12, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."); |