summaryrefslogtreecommitdiffstats
path: root/src/plugins/imageformats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-03-16 08:47:16 (GMT)
committeraxis <qt-info@nokia.com>2010-03-16 08:47:16 (GMT)
commit815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c (patch)
tree5d5e3ebc84dd6866a060b0d5416b6db873905e4e /src/plugins/imageformats
parent7ca339be57f1b8dbf9e289fae578c110813eb767 (diff)
parentfdcb62d5d6a3e295273042555d2551eb491a5b2d (diff)
downloadQt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.zip
Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.gz
Qt-815af5a5e42f0d9eb7ee85e7e1bf1faae8d3a47c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7-s60
Conflicts: demos/embedded/anomaly/anomaly.pro demos/embedded/flightinfo/flightinfo.pro demos/embedded/lightmaps/lightmaps.pro demos/embedded/weatherinfo/weatherinfo.pro examples/network/fortuneclient/fortuneclient.pro examples/network/fortuneserver/fortuneserver.pro examples/network/network-chat/network-chat.pro mkspecs/common/symbian/symbian.conf mkspecs/features/symbian/platform_paths.prf qmake/generators/symbian/symmake.cpp qmake/generators/symbian/symmake.h src/s60installs/s60installs.pro
Diffstat (limited to 'src/plugins/imageformats')
-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 0f0d6f6..abe3ffe 100644
--- a/src/plugins/imageformats/jpeg/qjpeghandler.cpp
+++ b/src/plugins/imageformats/jpeg/qjpeghandler.cpp
@@ -766,7 +766,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)