summaryrefslogtreecommitdiffstats
path: root/examples/richtext/textobject/svgtextobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/richtext/textobject/svgtextobject.cpp')
-rw-r--r--examples/richtext/textobject/svgtextobject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/richtext/textobject/svgtextobject.cpp b/examples/richtext/textobject/svgtextobject.cpp
index c84725d..2442623 100644
--- a/examples/richtext/textobject/svgtextobject.cpp
+++ b/examples/richtext/textobject/svgtextobject.cpp
@@ -48,7 +48,7 @@
QSizeF SvgTextObject::intrinsicSize(QTextDocument * /*doc*/, int /*posInDocument*/,
const QTextFormat &format)
{
- QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
+ QImage bufferedImage = qvariant_cast<QImage>(format.property(Window::SvgData));
QSize size = bufferedImage.size();
if (size.height() > 25)
@@ -63,7 +63,7 @@ void SvgTextObject::drawObject(QPainter *painter, const QRectF &rect,
QTextDocument * /*doc*/, int /*posInDocument*/,
const QTextFormat &format)
{
- QImage bufferedImage = qVariantValue<QImage>(format.property(Window::SvgData));
+ QImage bufferedImage = qvariant_cast<QImage>(format.property(Window::SvgData));
painter->drawImage(rect, bufferedImage);
}