summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-11 17:28:35 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-11 17:28:35 (GMT)
commitf4053c19b3e5584f97cfb0eb14d4b488259291b4 (patch)
treee1c66f8dee64bc102d8eaaef78ccd911becf507d /src/plugins
parent655a79094749f13f4b72d94a7b768ac89d21c7f4 (diff)
parent37353a95fd11ec03ccde5c4e85ef2f0a605b85db (diff)
downloadQt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.zip
Qt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.tar.gz
Qt-f4053c19b3e5584f97cfb0eb14d4b488259291b4.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( 266a6c4f1938dd9edf4a8125faf91c62495e3ce2 ) Doc: Removed lie that access to QBuffer is unbuffered. Minisplitter doesn't paint to the bottom/right Avoid unnecessary memory allocation in the jpeg handler's image detection
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/imageformats/jpeg/qjpeghandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/imageformats/jpeg/qjpeghandler.cpp b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
index 6cb93ad..98bd88f 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -1188,7 +1188,11 @@ bool QJpegHandler::canRead(QIODevice *device)
return false;
}
- return device->peek(2) == "\xFF\xD8";
+ char buffer[2];
+ if (device->peek(buffer, 2) != 2)
+ return false;
+
+ return uchar(buffer[0]) == 0xff && uchar(buffer[1]) == 0xd8;
}
bool QJpegHandler::read(QImage *image)