summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-13 07:21:52 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-13 07:21:52 (GMT)
commit7180ccf653af6370fedc43debcfbf2386f0a4b3d (patch)
treea8364c746c9cd9045ac711b6ba05d33aa39a23fc /src/plugins/imageformats
parent50711dd7aa22052eff58431d9f4e95e1a688047e (diff)
parent2555221bbcb33e0d12e786eb0b3d08bd9260eeb7 (diff)
downloadQt-7180ccf653af6370fedc43debcfbf2386f0a4b3d.zip
Qt-7180ccf653af6370fedc43debcfbf2386f0a4b3d.tar.gz
Qt-7180ccf653af6370fedc43debcfbf2386f0a4b3d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (35 commits) Avoid running animation when loopCount == 0 Set the pictures for the examples of multitouch Compile fix on Windows. Remove an unnecessary assert. Documentation for the Pad Navigator Example. New Pad Nagivator example implementation. Skip definition of wintab functions in case of QT_NO_TABLETEVENT. Made curve tesselation be dynamically adjusted based on transform. Modified QPainter and QPixmap benchmarks to use raster pixmaps. Stabilize tst_QWidgetAction::visibilityUpdate Fix compiler warning in QT_REQUIRE_VERSION Stabilize tst_QColumnView::parentCurrentIndex Really fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fix typos in Elastic Nodes example documentation. Made paint engine texture drawing work in GL ES 2 and updated docs. Opt out of visual-config size checks with extension Fix off-by-one in text layouts and widget size hints on Mac Stabilize tst_QDockWidget::taskQTBUG_9758_undockedGeometry Mark QFileDialog::Options as a Q_FLAGS fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux ...
Diffstat (limited to 'src/plugins/imageformats')
-rw-r--r--src/plugins/imageformats/svg/qsvgiohandler.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/imageformats/svg/qsvgiohandler.cpp b/src/plugins/imageformats/svg/qsvgiohandler.cpp
index 8155569..7b8463d 100644
--- a/src/plugins/imageformats/svg/qsvgiohandler.cpp
+++ b/src/plugins/imageformats/svg/qsvgiohandler.cpp
@@ -82,15 +82,19 @@ bool QSvgIOHandlerPrivate::load(QIODevice *device)
if (q->format().isEmpty())
q->canRead();
+ // # The SVG renderer doesn't handle trailing, unrelated data, so we must
+ // assume that all available data in the device is to be read.
bool res = false;
QBuffer *buf = qobject_cast<QBuffer *>(device);
if (buf) {
- res = r.load(buf->data());
+ const QByteArray &ba = buf->data();
+ res = r.load(QByteArray::fromRawData(ba.constData() + buf->pos(), ba.size() - buf->pos()));
+ buf->seek(ba.size());
} else if (q->format() == "svgz") {
- res = r.load(device->readAll()); // ### can't stream svgz
+ res = r.load(device->readAll());
} else {
xmlReader.setDevice(device);
- res = r.load(&xmlReader); //### doesn't leave pos() correctly
+ res = r.load(&xmlReader);
}
if (res) {