summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-07 20:49:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-07 20:49:46 (GMT)
commit5c073ef002273b4c4b01e0d4d1594e9c17699245 (patch)
tree043346f1c01a66bebd0d083df816bf6099e86af2 /src/plugins
parent6ff95852da22ba8843a2913c92aa37af36236ca0 (diff)
parentcb3f3858555bb5b385ee42bb51c4011b21779506 (diff)
downloadQt-5c073ef002273b4c4b01e0d4d1594e9c17699245.zip
Qt-5c073ef002273b4c4b01e0d4d1594e9c17699245.tar.gz
Qt-5c073ef002273b4c4b01e0d4d1594e9c17699245.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: Mark QFileDialog::Options as a Q_FLAGS fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fixed scrolling bugs in widget graphics effect backend. Fixed source pixmap bug in widget graphics effect backend. Fix crash with stylesheet if widget change style in the changeEvent Fix textdrawing under GL on N900. Fixed bug in QIODevice::read after first reading 0 bytes. Fix auto-test failure on Mac/Linux/QWS. Some EGL implementations does not return a EGLNativeDisplayType Fixed the sizing of the dock area with fixed size dock widgets QSortFilterProxyModel: Warning or assert failure Performance issue with QGraphicsItem::ItemClipsChildrenToShape. Fixes crash in QGraphicsItem::mouseMove for untransformable items. Pack Graphics View booleans in quint32 bit fields. Fixes regression: SVG image loading would fail from QBuffer with pos!=0 Fix a bug in QGraphicsItem::scroll. Fixed the position of the dock widget when undocked
Diffstat (limited to 'src/plugins')
-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) {