From 8a0159e10e7d052a32f6ba49e63d9542e4580111 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Fri, 16 Jan 2009 18:43:26 +0000 Subject: [PATCH] ensure that size() always return the real size svn path=/trunk/KDE/kdelibs/; revision=912123 --- svg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/svg.cpp b/svg.cpp index 10afb9635..a9b5b1e08 100644 --- a/svg.cpp +++ b/svg.cpp @@ -454,6 +454,11 @@ void Svg::paint(QPainter *painter, int x, int y, int width, int height, const QS QSize Svg::size() const { + if (d->size.isEmpty()) { + d->createRenderer(); + d->size = d->renderer->defaultSize(); + } + return d->size.toSize(); }