diff options
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/qsvghandler.cpp | 3 | ||||
-rw-r--r-- | src/svg/qsvgstyle.cpp | 1 | ||||
-rw-r--r-- | src/svg/qsvgwidget.cpp | 16 |
3 files changed, 7 insertions, 13 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 433a3ad..cb07c53 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -2541,6 +2541,9 @@ static QSvgNode *createImageNode(QSvgNode *parent, return 0; } + if (image.format() == QImage::Format_ARGB32) + image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied); + QSvgNode *img = new QSvgImage(parent, image, QRect(int(nx), diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index b065395..bd0804c 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -808,6 +808,7 @@ void QSvgGradientStyle::resolveStops() static_cast<QSvgGradientStyle*>(prop); st->resolveStops(); m_gradient->setStops(st->qgradient()->stops()); + m_gradientStopsSet = st->gradientStopsSet(); } } m_link = QString(); diff --git a/src/svg/qsvgwidget.cpp b/src/svg/qsvgwidget.cpp index a4200ca..ac8595f 100644 --- a/src/svg/qsvgwidget.cpp +++ b/src/svg/qsvgwidget.cpp @@ -83,18 +83,6 @@ class QSvgWidgetPrivate : public QWidgetPrivate { Q_DECLARE_PUBLIC(QSvgWidget) public: - QSvgWidgetPrivate() - : QWidgetPrivate() - { - Q_Q(QSvgWidget); - renderer = new QSvgRenderer(q); - } - QSvgWidgetPrivate(const QString &file) - : QWidgetPrivate() - { - Q_Q(QSvgWidget); - renderer = new QSvgRenderer(file, q); - } QSvgRenderer *renderer; }; @@ -104,6 +92,7 @@ public: QSvgWidget::QSvgWidget(QWidget *parent) : QWidget(*new QSvgWidgetPrivate, parent, 0) { + d_func()->renderer = new QSvgRenderer(this); QObject::connect(d_func()->renderer, SIGNAL(repaintNeeded()), this, SLOT(update())); } @@ -113,8 +102,9 @@ QSvgWidget::QSvgWidget(QWidget *parent) of the specified \a file. */ QSvgWidget::QSvgWidget(const QString &file, QWidget *parent) - : QWidget(*new QSvgWidgetPrivate(file), parent, 0) + : QWidget(*new QSvgWidgetPrivate, parent, 0) { + d_func()->renderer = new QSvgRenderer(file, this); QObject::connect(d_func()->renderer, SIGNAL(repaintNeeded()), this, SLOT(update())); } |