summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-20 19:13:50 +0200
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-20 19:13:50 +0200
commit392359c5413e2a824699625ee9174bb1a6eb8a71 (patch)
treeebd567f87acf54e14746faceb7b4fdac98baa60b
parent35d967c954245e313017a1cab97ce7ee9f08b3a8 (diff)
parent9f1c31c8a3cfd0f341987e8011abad172592dd3c (diff)
downloadqtsvg-392359c5413e2a824699625ee9174bb1a6eb8a71.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I521c0f85547f8a3272d201e2c7d48341bbf9034c
-rw-r--r--doc/src/examples/bearercloud.qdoc4
-rw-r--r--src/svg/doc/src/svgrendering.qdoc2
-rw-r--r--src/svg/qsvgstyle.cpp2
-rw-r--r--tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp9
4 files changed, 13 insertions, 4 deletions
diff --git a/doc/src/examples/bearercloud.qdoc b/doc/src/examples/bearercloud.qdoc
index fb58661..50063bd 100644
--- a/doc/src/examples/bearercloud.qdoc
+++ b/doc/src/examples/bearercloud.qdoc
@@ -66,7 +66,7 @@
class implements a Graphics View scene and manages the life-cycle of Cloud
objects in response to notification signals from QNetworkConfigurationManager.
- \section1 Setting the scene
+ \section1 Setting the Scene
When constructing the scene we first calculate some random offsets using the global qsand()
and qrand() functions. We will use these offsets to scatter the initial position of new Cloud
@@ -123,7 +123,7 @@
\snippet examples/network/bearercloud/bearercloud.cpp 4
- \section1 Responding to changes
+ \section1 Responding to Changes
Each network session and associated network configuration known to the system is represented in
the scene as a Cloud object.
diff --git a/src/svg/doc/src/svgrendering.qdoc b/src/svg/doc/src/svgrendering.qdoc
index 3ef66d5..eb8a365 100644
--- a/src/svg/doc/src/svgrendering.qdoc
+++ b/src/svg/doc/src/svgrendering.qdoc
@@ -40,7 +40,7 @@
\snippet doc_src_qtsvg.pro 1
- \section1 Rendering SVG files
+ \section1 Rendering SVG Files
Scalable Vector Graphics (SVG) is a language for describing two-dimensional
graphics and graphical applications in XML. SVG 1.1 is a W3C Recommendation
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index ac36de2..982c168 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -929,7 +929,7 @@ void QSvgGradientStyle::resolveStops()
{
if (!m_link.isEmpty() && m_doc) {
QSvgStyleProperty *prop = m_doc->styleProperty(m_link);
- if (prop) {
+ if (prop && prop != this) {
if (prop->type() == QSvgStyleProperty::GRADIENT) {
QSvgGradientStyle *st =
static_cast<QSvgGradientStyle*>(prop);
diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
index 9d66b3d..5253a3d 100644
--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
+++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp
@@ -612,6 +612,15 @@ void tst_QSvgRenderer::gradientRefs()
"<linearGradient id=\"gradient\" xlink:href=\"#gradient0\">"
"</linearGradient>"
"</defs>"
+ "</svg>",
+ "<svg>"
+ "<defs>"
+ "<linearGradient xlink:href=\"#0\" id=\"0\">"
+ "<stop offset=\"0\" stop-color=\"red\" stop-opacity=\"0\"/>"
+ "<stop offset=\"1\" stop-color=\"blue\"/>"
+ "</linearGradient>"
+ "</defs>"
+ "<rect fill=\"url(#0)\" height=\"8\" width=\"256\" x=\"0\" y=\"0\"/>"
"</svg>"
};
for (size_t i = 0 ; i < sizeof(svgs) / sizeof(svgs[0]) ; ++i)