summaryrefslogtreecommitdiffstats
path: root/tests/auto/qstatictext/tst_qstatictext.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-05 15:16:16 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-02-05 15:18:04 (GMT)
commit3d89703be18d13cc4a571ce875cff3ec6cca498f (patch)
tree8226680122ad651ec8eac1d44e2da3193f5f3df9 /tests/auto/qstatictext/tst_qstatictext.cpp
parent88b1aa6b3c0e03107db111921ef69de814f1dc06 (diff)
downloadQt-3d89703be18d13cc4a571ce875cff3ec6cca498f.zip
Qt-3d89703be18d13cc4a571ce875cff3ec6cca498f.tar.gz
Qt-3d89703be18d13cc4a571ce875cff3ec6cca498f.tar.bz2
Temporarily remove QPainter::drawStaticText() for Qt 4.6.x integration
We can't add new symbols to QPainter for Qt 4.6.x, as we would not be able to remove them again if we regretted the API. Hence, I've made removable symbols instead, a private global function and a drawStaticText() in QPainterPrivate. In order to tie things together, I needed a static private-getter in QPainterPrivate, and hence it had to be a friend of QPainter. Reviewed-by: Trond
Diffstat (limited to 'tests/auto/qstatictext/tst_qstatictext.cpp')
-rw-r--r--tests/auto/qstatictext/tst_qstatictext.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/auto/qstatictext/tst_qstatictext.cpp b/tests/auto/qstatictext/tst_qstatictext.cpp
index 08e7079..9e6f3d6 100644
--- a/tests/auto/qstatictext/tst_qstatictext.cpp
+++ b/tests/auto/qstatictext/tst_qstatictext.cpp
@@ -46,6 +46,7 @@
#include <private/qstatictext_p.h>
#include <private/qstatictext_p_p.h>
+#include <private/qpainter_p.h>
// #define DEBUG_SAVE_IMAGE
@@ -112,7 +113,7 @@ void tst_QStaticText::drawToPoint()
QPainter p(&imageDrawStaticText);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
text.setUseBackendOptimizations(useBackendOptimizations);
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -143,7 +144,7 @@ void tst_QStaticText::drawToRect()
QPainter p(&imageDrawStaticText);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.", QSizeF(10, 500));
text.setUseBackendOptimizations(useBackendOptimizations);
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -170,7 +171,7 @@ void tst_QStaticText::prepareToCorrectData()
p.setTransform(transform);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
text.prepare(transform, p.font());
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -195,7 +196,7 @@ void tst_QStaticText::prepareToWrongData()
QPainter p(&imageDrawStaticText);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
text.prepare(transform, p.font());
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -226,9 +227,9 @@ void tst_QStaticText::setFont()
QStaticText text;
text.setText("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(0, 0, text);
+ qt_draw_static_text(&p, QPointF(0, 0), text);
p.setFont(font);
- p.drawStaticText(11, 120, text);
+ qt_draw_static_text(&p, QPointF(11, 120), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -249,7 +250,7 @@ void tst_QStaticText::setMaximumSize()
QPainter p(&imageDrawStaticText);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
text.setMaximumSize(QSizeF(10, 500));
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -273,7 +274,7 @@ void tst_QStaticText::translatedPainter()
p.translate(100, 200);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -296,7 +297,7 @@ void tst_QStaticText::rotatedPainter()
QPainter p(&imageDrawStaticText);
p.rotate(30.0);
- p.drawStaticText(0, 0, text);
+ qt_draw_static_text(&p, QPointF(0, 0), text);
}
#if defined(DEBUG_SAVE_IMAGE)
@@ -325,7 +326,7 @@ void tst_QStaticText::scaledPainter()
p.scale(2.0, 0.2);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -352,7 +353,7 @@ void tst_QStaticText::projectedPainter()
p.setTransform(transform);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
QCOMPARE(imageDrawStaticText, imageDrawText);
@@ -381,7 +382,7 @@ void tst_QStaticText::rotatedScaledAndTranslatedPainter()
p.translate(100, 200);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(11, 12, text);
+ qt_draw_static_text(&p, QPointF(11, 12), text);
}
#if defined(DEBUG_SAVE_IMAGE)
@@ -415,10 +416,10 @@ void tst_QStaticText::transformationChanged()
p.scale(0.5, 0.7);
QStaticText text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
- p.drawStaticText(0, 0, text);
+ qt_draw_static_text(&p, QPointF(0, 0), text);
p.scale(7.0, 5.0);
- p.drawStaticText(0, 0, text);
+ qt_draw_static_text(&p, QPointF(0, 0), text);
}
#if defined(DEBUG_SAVE_IMAGE)