diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-19 06:30:59 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-19 06:31:06 +0200 |
commit | 640441882d20f86db05ab5fd1141abe39a0bd409 (patch) | |
tree | 9d0e701de155d32d3614a60b4d6eea5f324211f4 | |
parent | d16692ed1b12b2d464afcb32799580402e82e393 (diff) | |
parent | eba979f6956f8d74bf5a3cb6ed0d585396b790f1 (diff) |
Merge remote-tracking branch 'origin/5.6.1' into 5.6
Conflicts:
src/network/socket/qnativesocketengine_winrt.cpp
Change-Id: I8edb72f8ba958d80c3d7993b3feaaae782ca8d9c
34 files changed, 200 insertions, 46 deletions
diff --git a/.qmake.conf b/.qmake.conf index 53993bd4fe..50d27cf9ce 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,5 +1,4 @@ load(qt_build_config) -CONFIG += qt_example_installs CONFIG += warning_clean QT_SOURCE_TREE = $$PWD @@ -4039,7 +4039,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ]; setBootstrapVariable QMAKE_LFLAGS setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS - if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then + if [ "$CFG_DEBUG" = "no" ] || [ "$CFG_RELEASE_TOOLS" = "yes" ]; then setBootstrapVariable QMAKE_CFLAGS_RELEASE setBootstrapVariable QMAKE_CXXFLAGS_RELEASE EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)" diff --git a/mkspecs/features/lex.prf b/mkspecs/features/lex.prf index 1ca9ae8afa..16d3a6aa94 100644 --- a/mkspecs/features/lex.prf +++ b/mkspecs/features/lex.prf @@ -11,9 +11,13 @@ lex.variable_out = GENERATED_SOURCES } + isEmpty(QMAKE_LEXFLAGS_MANGLE):QMAKE_LEXFLAGS_MANGLE = -P${QMAKE_FILE_BASE} + QMAKE_LEXEXTRAFLAGS = $$QMAKE_LEXFLAGS + !yacc_no_name_mangle:QMAKE_LEXEXTRAFLAGS += $$QMAKE_LEXFLAGS_MANGLE + contains(QMAKE_LEX, .*flex) { # GNU flex, we can use -o outfile - lex.commands = $$QMAKE_LEX $$QMAKE_LEXFLAGS --nounistd -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} + lex.commands = $$QMAKE_LEX $$QMAKE_LEXEXTRAFLAGS --nounistd -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} } else { # stupid POSIX lex, it only generates a file called lex.yy.c # or lex.prefix.c if the -P<prefix> option is active diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf index 2d437e7f91..1e2d5c2423 100644 --- a/mkspecs/features/qt_build_config.prf +++ b/mkspecs/features/qt_build_config.prf @@ -71,6 +71,7 @@ CONFIG += \ create_prl link_prl \ prepare_docs qt_docs_targets \ no_private_qt_headers_warning QTDIR_build \ + qt_example_installs \ # Qt modules get compiled without exceptions enabled by default. # However, testcases should be still built with exceptions. exceptions_off testcase_exceptions diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index ebf68a8a21..4c68cfd72f 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -100,6 +100,20 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) !isEmpty(allfiles): warning("remaining files in $$_PRO_FILE_PWD_: $$allfiles") } + equals(TEMPLATE, app)|equals(TEMPLATE, lib) { + !contains(INSTALLS, target) { + !install_ok: \ + error("$$_PRO_FILE_ is lacking an install target.") + else: check_examples: \ + warning("$$_PRO_FILE_ is lacking an install target.") + } else: !equals(target.path, $$sources.path) { + !install_ok: \ + error("$$_PRO_FILE_ installs target to unexpected location.") + else: check_examples: \ + warning("$$_PRO_FILE_ installs target to unexpected location.") + } + } + !equals(TEMPLATE, subdirs):!compile_examples { TEMPLATE = aux CONFIG -= have_target qt staticlib dll diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf index 513faa2291..3393154436 100644 --- a/mkspecs/features/qt_helper_lib.prf +++ b/mkspecs/features/qt_helper_lib.prf @@ -13,6 +13,7 @@ load(qt_build_paths) TEMPLATE = lib CONFIG -= qt +QT = # In case qt is re-added. CONFIG -= warning_clean # Don't presume 3rd party code to be clean load(qt_common) diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp index 223e2b019b..dd554f4f38 100644 --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp @@ -2370,6 +2370,19 @@ unsigned int Renderer11::getReservedFragmentUniformBuffers() const bool Renderer11::getShareHandleSupport() const { + if (mDriverType == D3D_DRIVER_TYPE_WARP) + { +#if !defined(ANGLE_ENABLE_WINDOWS_STORE) + // Warp mode does not support shared handles in Windows versions below Windows 8 + OSVERSIONINFO result = { sizeof(OSVERSIONINFO), 0, 0, 0, 0, {'\0'}}; + if (GetVersionEx(&result) && + ((result.dwMajorVersion == 6 && result.dwMinorVersion < 2) || result.dwMajorVersion < 6)) + { + // WARP on Windows 7 doesn't support shared handles + return false; + } +#endif // ANGLE_ENABLE_WINDOWS_STORE + } // We only currently support share handles with BGRA surfaces, because // chrome needs BGRA. Once chrome fixes this, we should always support them. // PIX doesn't seem to support using share handles, so disable them. diff --git a/src/3rdparty/freetype/freetype.pro b/src/3rdparty/freetype/freetype.pro index 04aa3b8e18..e16f696372 100644 --- a/src/3rdparty/freetype/freetype.pro +++ b/src/3rdparty/freetype/freetype.pro @@ -64,10 +64,10 @@ win32 { INCLUDEPATH += $$PWD/include DEFINES += FT2_BUILD_LIBRARY -contains(QT_CONFIG, system-zlib) { - DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB - include($$PWD/../zlib_dependency.pri) -} + +DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB +include(../zlib_dependency.pri) + contains(QT_CONFIG, system-png) { DEFINES += FT_CONFIG_OPTION_USE_PNG include($$PWD/../png_dependency.pri) diff --git a/src/3rdparty/zlib_dependency.pri b/src/3rdparty/zlib_dependency.pri index 0bcb9f9e5e..53e0b3ef39 100644 --- a/src/3rdparty/zlib_dependency.pri +++ b/src/3rdparty/zlib_dependency.pri @@ -7,4 +7,8 @@ contains(QT_CONFIG, system-zlib) { } } else { INCLUDEPATH += $$PWD/zlib + !no_core_dep { + CONFIG += qt + QT_PRIVATE += core + } } diff --git a/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch b/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch new file mode 100644 index 0000000000..1c4ee1d513 --- /dev/null +++ b/src/angle/patches/0011-ANGLE-Disable-support-for-shared-handles-in-warp-mod.patch @@ -0,0 +1,44 @@ +From db13a9cf7e41207660f080827983655864df802d Mon Sep 17 00:00:00 2001 +From: Oliver Wolff <oliver.wolff@qt.io> +Date: Wed, 11 May 2016 13:51:54 +0200 +Subject: [PATCH] ANGLE: Disable support for shared handles in warp mode on + Windows < 8 + +Shared handles are not supported on Windows 7 and below. If the +according flag is set CreateTexture2D will fail with E_OUTOFMEMORY. The +check already happens with newer ANGLE versions, which we use in 5.7 +but has to happen here as well. Otherwise Qt applications running on +Windows 7 and below will crash at startup. + +Change-Id: I8f539f16dce298611fb1ec7b2f6804d4a04d04e0 +--- + .../angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +index 223e2b0..dd554f4 100644 +--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp ++++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp +@@ -2370,6 +2370,19 @@ unsigned int Renderer11::getReservedFragmentUniformBuffers() const + + bool Renderer11::getShareHandleSupport() const + { ++ if (mDriverType == D3D_DRIVER_TYPE_WARP) ++ { ++#if !defined(ANGLE_ENABLE_WINDOWS_STORE) ++ // Warp mode does not support shared handles in Windows versions below Windows 8 ++ OSVERSIONINFO result = { sizeof(OSVERSIONINFO), 0, 0, 0, 0, {'\0'}}; ++ if (GetVersionEx(&result) && ++ ((result.dwMajorVersion == 6 && result.dwMinorVersion < 2) || result.dwMajorVersion < 6)) ++ { ++ // WARP on Windows 7 doesn't support shared handles ++ return false; ++ } ++#endif // ANGLE_ENABLE_WINDOWS_STORE ++ } + // We only currently support share handles with BGRA surfaces, because + // chrome needs BGRA. Once chrome fixes this, we should always support them. + // PIX doesn't seem to support using share handles, so disable them. +-- +2.7.0.windows.1 + diff --git a/src/concurrent/doc/qtconcurrent.qdocconf b/src/concurrent/doc/qtconcurrent.qdocconf index 3cd2fac075..d8ee963ef5 100644 --- a/src/concurrent/doc/qtconcurrent.qdocconf +++ b/src/concurrent/doc/qtconcurrent.qdocconf @@ -4,7 +4,7 @@ project = QtConcurrent description = Qt Concurrent Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/qtconcurrent +examplesinstallpath = qtconcurrent qhp.projects = QtConcurrent diff --git a/src/corelib/doc/qtcore.qdocconf b/src/corelib/doc/qtcore.qdocconf index e98f06d47d..3d64708def 100644 --- a/src/corelib/doc/qtcore.qdocconf +++ b/src/corelib/doc/qtcore.qdocconf @@ -4,7 +4,7 @@ project = QtCore description = Qt Core Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/corelib +examplesinstallpath = corelib qhp.projects = QtCore diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 90297b9115..630cdcae98 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -3653,7 +3653,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti \fn QAbstractItemModel::modelAboutToBeReset() \since 4.2 - This signal is emitted when reset() is called, before the model's internal + This signal is emitted when beginResetModel() is called, before the model's internal state (e.g. persistent model indexes) has been invalidated. \sa beginResetModel(), modelReset() @@ -3663,7 +3663,7 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti \fn QAbstractItemModel::modelReset() \since 4.1 - This signal is emitted when reset() or endResetModel() is called, after the + This signal is emitted when endResetModel() is called, after the model's internal state (e.g. persistent model indexes) has been invalidated. Note that if a model is reset it should be considered that all information diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri index ed6afe70ce..bf4c6e2912 100644 --- a/src/corelib/tools/tools.pri +++ b/src/corelib/tools/tools.pri @@ -158,6 +158,7 @@ else:SOURCES += tools/qelapsedtimer_generic.cpp contains(QT_CONFIG, zlib) { include($$PWD/../../3rdparty/zlib.pri) } else { + CONFIG += no_core_dep include($$PWD/../../3rdparty/zlib_dependency.pri) } diff --git a/src/dbus/doc/qtdbus.qdocconf b/src/dbus/doc/qtdbus.qdocconf index fc8921ff35..ff46cc5961 100644 --- a/src/dbus/doc/qtdbus.qdocconf +++ b/src/dbus/doc/qtdbus.qdocconf @@ -19,7 +19,7 @@ sourcedirs += .. \ ../../../examples/dbus/doc/src excludedirs += ../../../examples/widgets/doc -examplesinstallpath = qtbase/dbus +examplesinstallpath = dbus depends += qtdoc qtcore diff --git a/src/gui/doc/qtgui.qdocconf b/src/gui/doc/qtgui.qdocconf index e34347b801..436e2e0b34 100644 --- a/src/gui/doc/qtgui.qdocconf +++ b/src/gui/doc/qtgui.qdocconf @@ -4,7 +4,7 @@ project = QtGui description = Qt GUI Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/gui +examplesinstallpath = gui qhp.projects = QtGui diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 62254213f3..1acd84754a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6268,7 +6268,7 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const pen.setColor(uc); // Adapt wave to underlineOffset or pen width, whatever is larger, to make it work on all platforms - const QPixmap wave = generateWavyPixmap(qMin(qMax(underlineOffset, pen.widthF()), maxHeight / 2.), pen); + const QPixmap wave = generateWavyPixmap(qMin(qMax(underlineOffset, pen.widthF()), maxHeight / qreal(2.)), pen); const int descent = qFloor(maxHeight); painter->setBrushOrigin(painter->brushOrigin().x(), 0); @@ -6279,7 +6279,7 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const // the text above it, but limit it to stay within descent. qreal adjustedUnderlineOffset = std::ceil(underlineOffset) + 0.5; if (underlineOffset <= fe->descent().toReal()) - adjustedUnderlineOffset = qMin(adjustedUnderlineOffset, fe->descent().toReal() - 0.5); + adjustedUnderlineOffset = qMin(adjustedUnderlineOffset, fe->descent().toReal() - qreal(0.5)); const qreal underlinePos = pos.y() + adjustedUnderlineOffset; QColor uc = charFormat.underlineColor(); if (uc.isValid()) diff --git a/src/network/doc/qtnetwork.qdocconf b/src/network/doc/qtnetwork.qdocconf index 87e322d6c0..2a8e577dda 100644 --- a/src/network/doc/qtnetwork.qdocconf +++ b/src/network/doc/qtnetwork.qdocconf @@ -4,7 +4,7 @@ project = QtNetwork description = Qt Network Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/network +examplesinstallpath = network qhp.projects = QtNetwork diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp index d79dffa215..1c63e97ee8 100644 --- a/src/network/socket/qnativesocketengine_winrt.cpp +++ b/src/network/socket/qnativesocketengine_winrt.cpp @@ -458,22 +458,24 @@ void QNativeSocketEngine::close() } #if _MSC_VER >= 1900 - hr = QEventDispatcherWinRT::runOnXamlThread([d]() { - HRESULT hr; - // To close the connection properly (not with a hard reset) all pending read operation have to - // be finished or cancelled. The API isn't available on Windows 8.1 though. - ComPtr<IStreamSocket3> socket3; - hr = d->tcpSocket()->QueryInterface(IID_PPV_ARGS(&socket3)); - Q_ASSERT_SUCCEEDED(hr); + if (d->socketType == QAbstractSocket::TcpSocket) { + hr = QEventDispatcherWinRT::runOnXamlThread([d]() { + HRESULT hr; + // To close the connection properly (not with a hard reset) all pending read operation have to + // be finished or cancelled. The API isn't available on Windows 8.1 though. + ComPtr<IStreamSocket3> socket3; + hr = d->tcpSocket()->QueryInterface(IID_PPV_ARGS(&socket3)); + Q_ASSERT_SUCCEEDED(hr); - ComPtr<IAsyncAction> action; - hr = socket3->CancelIOAsync(&action); - Q_ASSERT_SUCCEEDED(hr); - hr = QWinRTFunctions::await(action); + ComPtr<IAsyncAction> action; + hr = socket3->CancelIOAsync(&action); + Q_ASSERT_SUCCEEDED(hr); + hr = QWinRTFunctions::await(action); + Q_ASSERT_SUCCEEDED(hr); + return S_OK; + }); Q_ASSERT_SUCCEEDED(hr); - return S_OK; - }); - Q_ASSERT_SUCCEEDED(hr); + } #endif // _MSC_VER >= 1900 if (d->readOp) { diff --git a/src/opengl/doc/qtopengl.qdocconf b/src/opengl/doc/qtopengl.qdocconf index 3c5fc280bd..6ff6cae2cb 100644 --- a/src/opengl/doc/qtopengl.qdocconf +++ b/src/opengl/doc/qtopengl.qdocconf @@ -21,7 +21,7 @@ imagedirs += images \ depends += qtdoc qtcore qtgui qtwidgets qmake -examplesinstallpath = qtbase/opengl +examplesinstallpath = opengl # The following parameters are for creating a qhp file, the qhelpgenerator # program can convert the qhp file into a qch file which can be opened in diff --git a/src/platformheaders/doc/qtplatformheaders.qdocconf b/src/platformheaders/doc/qtplatformheaders.qdocconf index fc8a9d8731..1c09971e23 100644 --- a/src/platformheaders/doc/qtplatformheaders.qdocconf +++ b/src/platformheaders/doc/qtplatformheaders.qdocconf @@ -4,7 +4,7 @@ project = QtPlatformHeaders description = Qt Platform Headers Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/qtplatformheaders +examplesinstallpath = qtplatformheaders qhp.projects = QtPlatformHeaders diff --git a/src/plugins/imageformats/ico/qicohandler.cpp b/src/plugins/imageformats/ico/qicohandler.cpp index 19525397fa..d4dcabeee6 100644 --- a/src/plugins/imageformats/ico/qicohandler.cpp +++ b/src/plugins/imageformats/ico/qicohandler.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE typedef struct { quint8 bWidth; // Width of the image - quint8 bHeight; // Height of the image (times 2) + quint8 bHeight; // Height of the image (actual height, not times 2) quint8 bColorCount; // Number of colors in image (0 if >=8bpp) [ not ture ] quint8 bReserved; // Reserved quint16 wPlanes; // Color Planes @@ -681,8 +681,8 @@ bool ICOReader::write(QIODevice *device, const QVector<QImage> &images) entries[i].bColorCount = 0; entries[i].bReserved = 0; entries[i].wBitCount = nbits; - entries[i].bHeight = image.height(); - entries[i].bWidth = image.width(); + entries[i].bHeight = image.height() < 256 ? image.height() : 0; // 0 means 256 + entries[i].bWidth = image.width() < 256 ? image.width() : 0; // 0 means 256 entries[i].dwBytesInRes = BMP_INFOHDR_SIZE + (bpl_bmp * image.height()) + (maskImage.bytesPerLine() * maskImage.height()); entries[i].wPlanes = 1; @@ -696,11 +696,11 @@ bool ICOReader::write(QIODevice *device, const QVector<QImage> &images) bmpHeaders[i].biClrImportant = 0; bmpHeaders[i].biClrUsed = entries[i].bColorCount; bmpHeaders[i].biCompression = 0; - bmpHeaders[i].biHeight = entries[i].bHeight * 2; // 2 is for the mask + bmpHeaders[i].biHeight = entries[i].bHeight ? entries[i].bHeight * 2 : 256 * 2; // 2 is for the mask bmpHeaders[i].biPlanes = entries[i].wPlanes; bmpHeaders[i].biSize = BMP_INFOHDR_SIZE; bmpHeaders[i].biSizeImage = entries[i].dwBytesInRes - BMP_INFOHDR_SIZE; - bmpHeaders[i].biWidth = entries[i].bWidth; + bmpHeaders[i].biWidth = entries[i].bWidth ? entries[i].bWidth : 256; bmpHeaders[i].biXPelsPerMeter = 0; bmpHeaders[i].biYPelsPerMeter = 0; diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 0f422843e0..49f3da48c2 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -110,6 +110,8 @@ QCocoaMenuItem::~QCocoaMenuItem() if (m_merged) { [m_native setHidden:YES]; } else { + if (m_menu && m_menu->attachedItem() == m_native) + m_menu->setAttachedItem(nil); [m_native release]; } diff --git a/src/plugins/platforms/windows/openglblacklists/default.json b/src/plugins/platforms/windows/openglblacklists/default.json index f7a8844611..1e00da52eb 100644 --- a/src/plugins/platforms/windows/openglblacklists/default.json +++ b/src/plugins/platforms/windows/openglblacklists/default.json @@ -90,6 +90,18 @@ "features": [ "disable_angle" ] + }, + { + "id": 8, + "description": "Standard VGA: Insufficent support for OpenGL, D3D9 and D3D11", + "vendor_id": "0x0000", + "device_id": ["0x0000"], + "os": { + "type": "win" + }, + "features": [ + "disable_desktopgl", "disable_d3d11", "disable_d3d9" + ] } ] } diff --git a/src/printsupport/doc/qtprintsupport.qdocconf b/src/printsupport/doc/qtprintsupport.qdocconf index d8fbc23c0a..fbb6f8d1a9 100644 --- a/src/printsupport/doc/qtprintsupport.qdocconf +++ b/src/printsupport/doc/qtprintsupport.qdocconf @@ -4,7 +4,7 @@ project = QtPrintSupport description = Qt Print Support Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/printsupport +examplesinstallpath = printsupport qhp.projects = QtPrintSupport diff --git a/src/sql/doc/qtsql.qdocconf b/src/sql/doc/qtsql.qdocconf index ceaa75f455..5a224adeb9 100644 --- a/src/sql/doc/qtsql.qdocconf +++ b/src/sql/doc/qtsql.qdocconf @@ -4,7 +4,7 @@ project = QtSql description = Qt SQL Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/sql +examplesinstallpath = sql qhp.projects = QtSql diff --git a/src/src.pro b/src/src.pro index d68384d4a2..ed752c3276 100644 --- a/src/src.pro +++ b/src/src.pro @@ -129,7 +129,12 @@ src_plugins.depends = src_sql src_xml src_network src_android.subdir = $$PWD/android # this order is important -contains(QT_CONFIG, zlib)|cross_compile: SUBDIRS += src_qtzlib +contains(QT_CONFIG, zlib)|cross_compile { + SUBDIRS += src_qtzlib + contains(QT_CONFIG, zlib) { + src_3rdparty_freetype.depends += src_corelib + } +} SUBDIRS += src_tools_bootstrap src_tools_moc src_tools_rcc !contains(QT_DISABLED_FEATURES, regularexpression):pcre { SUBDIRS += src_3rdparty_pcre diff --git a/src/testlib/doc/qttestlib.qdocconf b/src/testlib/doc/qttestlib.qdocconf index 72db51b925..0fafc733b1 100644 --- a/src/testlib/doc/qttestlib.qdocconf +++ b/src/testlib/doc/qttestlib.qdocconf @@ -4,7 +4,7 @@ project = QtTestLib description = Qt Test Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/testlib +examplesinstallpath = testlib qhp.projects = QtTestLib diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro index b3df192110..ae0d581a58 100644 --- a/src/tools/bootstrap/bootstrap.pro +++ b/src/tools/bootstrap/bootstrap.pro @@ -132,8 +132,12 @@ macx { ../../corelib/io/qstandardpaths_win.cpp } -if(contains(QT_CONFIG, zlib)|cross_compile):include(../../3rdparty/zlib.pri) -else:include(../../3rdparty/zlib_dependency.pri) +contains(QT_CONFIG, zlib)|cross_compile { + include(../../3rdparty/zlib.pri) +} else { + CONFIG += no_core_dep + include(../../3rdparty/zlib_dependency.pri) +} win32:LIBS += -luser32 -lole32 -ladvapi32 -lshell32 diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf index 8160396ca2..f307e9d3e4 100644 --- a/src/widgets/doc/qtwidgets.qdocconf +++ b/src/widgets/doc/qtwidgets.qdocconf @@ -4,7 +4,7 @@ project = QtWidgets description = Qt Widgets Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/widgets +examplesinstallpath = widgets qhp.projects = QtWidgets diff --git a/src/xml/doc/qtxml.qdocconf b/src/xml/doc/qtxml.qdocconf index b31c2a18d2..a23915487f 100644 --- a/src/xml/doc/qtxml.qdocconf +++ b/src/xml/doc/qtxml.qdocconf @@ -4,7 +4,7 @@ project = QtXml description = Qt XML Reference Documentation version = $QT_VERSION -examplesinstallpath = qtbase/xml +examplesinstallpath = xml qhp.projects = QtXml diff --git a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp index bff762fd04..6d2ed6d304 100644 --- a/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp +++ b/tests/auto/gui/image/qicoimageformat/tst_qicoimageformat.cpp @@ -64,6 +64,8 @@ private slots: void nextImageDelay(); void pngCompression_data(); void pngCompression(); + void write_data(); + void write(); private: QString m_IconPath; @@ -335,6 +337,51 @@ void tst_QIcoImageFormat::pngCompression() QCOMPARE(image.height(), height); } +void tst_QIcoImageFormat::write_data() +{ + QTest::addColumn<QSize>("inSize"); + QTest::addColumn<QSize>("outSize"); + + QTest::newRow("64x64") << QSize(64, 64) << QSize(64, 64); + QTest::newRow("128x200") << QSize(128, 200) << QSize(128, 200); + QTest::newRow("256x256") << QSize(256, 256) << QSize(256, 256); + QTest::newRow("400x400") << QSize(400, 400) << QSize(256, 256); +} + +void tst_QIcoImageFormat::write() +{ + QFETCH(QSize, inSize); + QFETCH(QSize, outSize); + + QImage inImg; + { + QImageReader reader(m_IconPath + "/valid/Qt.ico"); + reader.jumpToImage(4); + reader.setScaledSize(inSize); + inImg = reader.read(); + QVERIFY(!inImg.isNull()); + QCOMPARE(inImg.size(), inSize); + } + + QBuffer buf; + { + buf.open(QIODevice::WriteOnly); + QImageWriter writer(&buf, "ico"); + QVERIFY(writer.write(inImg)); + buf.close(); + } + { + buf.open(QIODevice::ReadOnly); + QImageReader reader(&buf); + QVERIFY(reader.canRead()); + QCOMPARE(reader.format(), QByteArray("ico")); + QImage outImg = reader.read(); + QVERIFY(!outImg.isNull()); + QCOMPARE(outImg.size(), outSize); + buf.close(); + } +} + QTEST_MAIN(tst_QIcoImageFormat) #include "tst_qicoimageformat.moc" diff --git a/tests/auto/gui/image/qimagewriter/images/App.ico b/tests/auto/gui/image/qimagewriter/images/App.ico Binary files differnew file mode 100644 index 0000000000..03b80a68f8 --- /dev/null +++ b/tests/auto/gui/image/qimagewriter/images/App.ico diff --git a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp index b3fdd00eb6..0347ef8810 100644 --- a/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp +++ b/tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp @@ -199,6 +199,7 @@ void tst_QImageWriter::writeImage_data() QTest::newRow("PBM: ship63") << QString("ship63.pbm") << true << QByteArray("pbm"); QTest::newRow("XBM: gnus") << QString("gnus.xbm") << false << QByteArray("xbm"); QTest::newRow("JPEG: beavis") << QString("beavis.jpg") << true << QByteArray("jpeg"); + QTest::newRow("ICO: App") << QString("App.ico") << true << QByteArray("ico"); } void tst_QImageWriter::writeImage() @@ -260,7 +261,7 @@ void tst_QImageWriter::writeImage2_data() QTest::addColumn<QImage>("image"); const QStringList formats = QStringList() << "bmp" << "xpm" << "png" - << "ppm"; //<< "jpeg"; + << "ppm" << "ico"; //<< "jpeg"; QImage image0(70, 70, QImage::Format_ARGB32); image0.fill(QColor(Qt::red).rgb()); |