diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-14 15:50:30 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-14 15:57:15 (GMT) |
commit | ab35f0f8b0d872bc2e963c6ef869fade71b83e3f (patch) | |
tree | af58509d936d6656fd6340c5f5da04aec85e912f /src/svg/qsvgstyle.cpp | |
parent | 886feff55f48ebdff0440278e611f822e6326c91 (diff) | |
download | Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.zip Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.tar.gz Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.tar.bz2 |
Fixed gradient referencing in SVGs.
An SVG element can now reference a gradient or solid-color defined
anywhere in the same SVG file.
Task-number: 245602
Reviewed-by: Trond
Diffstat (limited to 'src/svg/qsvgstyle.cpp')
-rw-r--r-- | src/svg/qsvgstyle.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index 564bf24..f834016 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -934,7 +934,7 @@ void QSvgGradientStyle::setStopLink(const QString &link, QSvgTinyDocument *doc) void QSvgGradientStyle::resolveStops() { if (!m_link.isEmpty() && m_doc) { - QSvgStyleProperty *prop = m_doc->scopeStyle(m_link); + QSvgStyleProperty *prop = m_doc->styleProperty(m_link); if (prop) { if (prop->type() == QSvgStyleProperty::GRADIENT) { QSvgGradientStyle *st = @@ -943,6 +943,8 @@ void QSvgGradientStyle::resolveStops() m_gradient->setStops(st->qgradient()->stops()); m_gradientStopsSet = st->gradientStopsSet(); } + } else { + qWarning("Could not resolve property : %s", qPrintable(m_link)); } m_link = QString(); } |