summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-12-01 22:51:04 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-12-01 22:51:04 +0100
commit8f7d6e731180c3d4f369293188b8c6ca866f05b9 (patch)
treea303b973b0329059b0f6d14da97cc0dec485d73e
parent2aca2b0a99eb20f53b3bc9814fd7514d8ea60d50 (diff)
parent531c30ea66d2b8fe517c89bed149a938e16332ec (diff)
Merge remote-tracking branch 'origin/5.6' into dev
-rw-r--r--src/3rdparty/jasper.pri2
-rw-r--r--src/3rdparty/libmng.pri2
-rw-r--r--src/3rdparty/zlib_dependency.pri6
-rw-r--r--src/plugins/imageformats/dds/qddshandler.cpp2
-rw-r--r--src/plugins/imageformats/imageformats.pro5
-rw-r--r--tests/auto/auto.pro6
-rw-r--r--tests/auto/dds/tst_qdds.cpp7
-rw-r--r--tests/auto/icns/tst_qicns.cpp7
-rw-r--r--tests/auto/jp2/tst_qjp2.cpp7
-rw-r--r--tests/auto/mng/tst_qmng.cpp7
-rw-r--r--tests/auto/tga/tst_qtga.cpp7
-rw-r--r--tests/auto/tiff/tst_qtiff.cpp3
-rw-r--r--tests/auto/wbmp/tst_qwbmp.cpp7
-rw-r--r--tests/auto/webp/tst_qwebp.cpp7
14 files changed, 65 insertions, 10 deletions
diff --git a/src/3rdparty/jasper.pri b/src/3rdparty/jasper.pri
index ec9f99f..ddb5c40 100644
--- a/src/3rdparty/jasper.pri
+++ b/src/3rdparty/jasper.pri
@@ -1,3 +1,5 @@
+warning("Using bundled unmaintained copy of libjasper.")
+
msvc: DEFINES += JAS_WIN_MSVC_BUILD
INCLUDEPATH += $$PWD/jasper/src/libjasper/include $$PWD/libjasper/include
SOURCES += \
diff --git a/src/3rdparty/libmng.pri b/src/3rdparty/libmng.pri
index 7b68210..95eeed3 100644
--- a/src/3rdparty/libmng.pri
+++ b/src/3rdparty/libmng.pri
@@ -1,3 +1,5 @@
+warning("Using bundled unmaintained copy of libmng.")
+
DEFINES += MNG_BUILD_SO
DEFINES += MNG_NO_INCLUDE_JNG
INCLUDEPATH += $$PWD/libmng
diff --git a/src/3rdparty/zlib_dependency.pri b/src/3rdparty/zlib_dependency.pri
index 74efbbb..4194fe2 100644
--- a/src/3rdparty/zlib_dependency.pri
+++ b/src/3rdparty/zlib_dependency.pri
@@ -3,9 +3,5 @@ contains(QT_CONFIG, system-zlib) {
unix|mingw: LIBS_PRIVATE += -lz
else: LIBS += zdll.lib
} else {
- load(qt_build_paths)
- git_build: \
- INCLUDEPATH += $$[QT_INSTALL_HEADERS/get]/QtZlib
- else: \
- INCLUDEPATH += $$[QT_INSTALL_HEADERS/src]/QtZlib
+ QT_PRIVATE += zlib-private
}
diff --git a/src/plugins/imageformats/dds/qddshandler.cpp b/src/plugins/imageformats/dds/qddshandler.cpp
index f7829aa..bfd18cd 100644
--- a/src/plugins/imageformats/dds/qddshandler.cpp
+++ b/src/plugins/imageformats/dds/qddshandler.cpp
@@ -1569,6 +1569,8 @@ bool QDDSHandler::ensureScanned() const
return false;
that->m_format = getFormat(m_header);
+ if (that->m_format == FormatUnknown)
+ return false;
m_scanState = ScanSuccess;
return true;
diff --git a/src/plugins/imageformats/imageformats.pro b/src/plugins/imageformats/imageformats.pro
index 3114367..1ed399a 100644
--- a/src/plugins/imageformats/imageformats.pro
+++ b/src/plugins/imageformats/imageformats.pro
@@ -2,13 +2,14 @@ TEMPLATE = subdirs
SUBDIRS = \
dds \
icns \
- jp2 \
- mng \
tga \
tiff \
wbmp \
webp
+config_jasper: SUBDIRS += jp2
+config_libmng: SUBDIRS += mng
+
wince:SUBDIRS -= jp2
winrt {
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index deda6cb..bf0f8e5 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -5,6 +5,6 @@ SUBDIRS = \
dds \
icns \
jp2 \
- webp
-
-contains(QT_CONFIG, system-zlib): SUBDIRS += mng tiff
+ webp \
+ mng \
+ tiff
diff --git a/tests/auto/dds/tst_qdds.cpp b/tests/auto/dds/tst_qdds.cpp
index ec731c2..ca66ec6 100644
--- a/tests/auto/dds/tst_qdds.cpp
+++ b/tests/auto/dds/tst_qdds.cpp
@@ -40,6 +40,7 @@ class tst_qdds: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
void testMipmaps_data();
@@ -48,6 +49,12 @@ private slots:
void testWriteImage();
};
+void tst_qdds::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("dds"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qdds::readImage_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/icns/tst_qicns.cpp b/tests/auto/icns/tst_qicns.cpp
index 8385ad1..969a0ca 100644
--- a/tests/auto/icns/tst_qicns.cpp
+++ b/tests/auto/icns/tst_qicns.cpp
@@ -40,12 +40,19 @@ class tst_qicns: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readIcons_data();
void readIcons();
void writeIcons_data();
void writeIcons();
};
+void tst_qicns::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("icns"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qicns::readIcons_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/jp2/tst_qjp2.cpp b/tests/auto/jp2/tst_qjp2.cpp
index 3400ece..5045eee 100644
--- a/tests/auto/jp2/tst_qjp2.cpp
+++ b/tests/auto/jp2/tst_qjp2.cpp
@@ -40,10 +40,17 @@ class tst_qjp2: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
};
+void tst_qjp2::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("jp2"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qjp2::readImage_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/mng/tst_qmng.cpp b/tests/auto/mng/tst_qmng.cpp
index 7e37d97..b82ece1 100644
--- a/tests/auto/mng/tst_qmng.cpp
+++ b/tests/auto/mng/tst_qmng.cpp
@@ -39,12 +39,19 @@ class tst_qmng: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
void readCorruptImage_data();
void readCorruptImage();
};
+void tst_qmng::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("mng"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qmng::readImage_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/tga/tst_qtga.cpp b/tests/auto/tga/tst_qtga.cpp
index 6569077..0001383 100644
--- a/tests/auto/tga/tst_qtga.cpp
+++ b/tests/auto/tga/tst_qtga.cpp
@@ -39,10 +39,17 @@ class tst_qtga: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
};
+void tst_qtga::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("tga"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qtga::readImage_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/tiff/tst_qtiff.cpp b/tests/auto/tiff/tst_qtiff.cpp
index 70837a5..a77a735 100644
--- a/tests/auto/tiff/tst_qtiff.cpp
+++ b/tests/auto/tiff/tst_qtiff.cpp
@@ -89,6 +89,9 @@ private:
void tst_qtiff::initTestCase()
{
+ if (!QImageReader::supportedImageFormats().contains("tiff"))
+ QSKIP("The image format handler is not installed.");
+
prefix = ":/tiff/";
}
diff --git a/tests/auto/wbmp/tst_qwbmp.cpp b/tests/auto/wbmp/tst_qwbmp.cpp
index 344cd3d..a315fc4 100644
--- a/tests/auto/wbmp/tst_qwbmp.cpp
+++ b/tests/auto/wbmp/tst_qwbmp.cpp
@@ -39,10 +39,17 @@ class tst_qwbmp: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
};
+void tst_qwbmp::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("wbmp"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qwbmp::readImage_data()
{
QTest::addColumn<QString>("fileName");
diff --git a/tests/auto/webp/tst_qwebp.cpp b/tests/auto/webp/tst_qwebp.cpp
index 2708004..5cbfc0c 100644
--- a/tests/auto/webp/tst_qwebp.cpp
+++ b/tests/auto/webp/tst_qwebp.cpp
@@ -39,12 +39,19 @@ class tst_qwebp : public QObject
Q_OBJECT
private slots:
+ void initTestCase();
void readImage_data();
void readImage();
void writeImage_data();
void writeImage();
};
+void tst_qwebp::initTestCase()
+{
+ if (!QImageReader::supportedImageFormats().contains("webp"))
+ QSKIP("The image format handler is not installed.");
+}
+
void tst_qwebp::readImage_data()
{
QTest::addColumn<QString>("fileName");