diff options
author | Liang Qi <liang.qi@qt.io> | 2016-11-26 12:53:58 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-11-26 12:53:58 +0100 |
commit | 65db62e4398c5ddfba1ea7825987b3f4ab04369e (patch) | |
tree | 0c21a6ee63675f4dafe9c922fd2e81805182f201 /src/plugins | |
parent | 52dd6b1e9a3fe249b153bdcebe08455ff716309d (diff) | |
parent | 018828170d807f6647a843e61c82733c3f601d14 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Change-Id: I6c1caae4b071cac4caf88bf85582a2a76a1ccd2b
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/imageformats/dds/qddshandler.cpp | 5 | ||||
-rw-r--r-- | src/plugins/imageformats/imageformats.pro | 2 | ||||
-rw-r--r-- | src/plugins/imageformats/macjp2/qiiofhelpers.cpp | 2 | ||||
-rw-r--r-- | src/plugins/imageformats/tga/qtgafile.cpp | 2 | ||||
-rw-r--r-- | src/plugins/imageformats/webp/qwebphandler.cpp | 1 |
5 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp index 1d6a178..3a44b51 100644 --- a/src/plugins/imageformats/dds/qddshandler.cpp +++ b/src/plugins/imageformats/dds/qddshandler.cpp @@ -996,7 +996,8 @@ static QImage readA2W10V10U10(QDataStream &s, quint32 width, quint32 height) quint8 b = qint8((tmp & 0x000003ff) >> 0 >> 2) + 128; quint8 a = 0xff * ((tmp & 0xc0000000) >> 30) / 3; // dunno why we should swap b and r here - line[x] = qRgba(b, g, r, a); + std::swap(b, r); + line[x] = qRgba(r, g, b, a); } } @@ -1373,7 +1374,9 @@ static int formatByName(const QByteArray &name) } QDDSHandler::QDDSHandler() : + m_header(), m_format(FormatA8R8G8B8), + m_header10(), m_currentImage(0), m_scanState(ScanNotScanned) { diff --git a/src/plugins/imageformats/imageformats.pro b/src/plugins/imageformats/imageformats.pro index 24f5f84..118d7ea 100644 --- a/src/plugins/imageformats/imageformats.pro +++ b/src/plugins/imageformats/imageformats.pro @@ -1,6 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ - dds \ +# dds \ icns \ tga \ tiff \ diff --git a/src/plugins/imageformats/macjp2/qiiofhelpers.cpp b/src/plugins/imageformats/macjp2/qiiofhelpers.cpp index 99903b0..c894932 100644 --- a/src/plugins/imageformats/macjp2/qiiofhelpers.cpp +++ b/src/plugins/imageformats/macjp2/qiiofhelpers.cpp @@ -74,7 +74,7 @@ static off_t cbSkipForward(void *info, off_t count) } else { char *buf = new char[count]; res = dev->read(buf, count); - delete buf; + delete[] buf; } return qMax(qint64(0), res); } diff --git a/src/plugins/imageformats/tga/qtgafile.cpp b/src/plugins/imageformats/tga/qtgafile.cpp index 355b8a1..52e5eab 100644 --- a/src/plugins/imageformats/tga/qtgafile.cpp +++ b/src/plugins/imageformats/tga/qtgafile.cpp @@ -58,7 +58,7 @@ struct Tga16Reader : public TgaReader if (s->getChar(&ch1) && s->getChar(&ch2)) { quint16 d = (int(ch1) & 0xFF) | ((int(ch2) & 0xFF) << 8); QRgb result = (d & 0x8000) ? 0xFF000000 : 0x00000000; - result |= (d & 0x7C00 << 6) | (d & 0x03E0 << 3) | (d & 0x001F); + result |= ((d & 0x7C00) << 6) | ((d & 0x03E0) << 3) | (d & 0x001F); return result; } else { return 0; diff --git a/src/plugins/imageformats/webp/qwebphandler.cpp b/src/plugins/imageformats/webp/qwebphandler.cpp index a59e6bd..0bd89f6 100644 --- a/src/plugins/imageformats/webp/qwebphandler.cpp +++ b/src/plugins/imageformats/webp/qwebphandler.cpp @@ -51,6 +51,7 @@ QWebpHandler::QWebpHandler() : m_lossless(false), m_quality(75), m_scanState(ScanNotScanned), + m_features(), m_loop(0), m_frameCount(0), m_demuxer(NULL), |