diff --git a/3rdparty/ext_qt/disable-wintab.diff b/3rdparty/ext_qt/0001-disable-wintab.patch similarity index 55% rename from 3rdparty/ext_qt/disable-wintab.diff rename to 3rdparty/ext_qt/0001-disable-wintab.patch index 7a986d5da4..2387f13e4c 100644 --- a/3rdparty/ext_qt/disable-wintab.diff +++ b/3rdparty/ext_qt/0001-disable-wintab.patch @@ -1,68 +1,86 @@ -diff --git a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp -index e6e6ee8b1a..89143b6d3f 100644 ---- a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp -+++ b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp -@@ -240,9 +240,6 @@ struct QWindowsContextPrivate { +From 16a528dfc3ef30fee213026391c923d4d19fd4a0 Mon Sep 17 00:00:00 2001 +From: Dmitry Kazakov +Date: Mon, 11 Feb 2019 17:51:39 +0300 +Subject: [PATCH 1/4] disable wintab + +Change-Id: I10095ac8c486fcccb97f4a8d7036441eea6a1bc0 +--- + .../platforms/windows/qwindowscontext.cpp | 24 ------------------- + 1 file changed, 24 deletions(-) + +diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp +index 1f80ac5872..ded8130398 100644 +--- a/src/plugins/platforms/windows/qwindowscontext.cpp ++++ b/src/plugins/platforms/windows/qwindowscontext.cpp +@@ -265,9 +265,6 @@ struct QWindowsContextPrivate { QWindowsMimeConverter m_mimeConverter; QWindowsScreenManager m_screenManager; QSharedPointer m_creationContext; -#if QT_CONFIG(tabletevent) - QScopedPointer m_tabletSupport; -#endif const HRESULT m_oleInitializeResult; - const QByteArray m_eventType; QWindow *m_lastActiveWindow = nullptr; -@@ -281,17 +278,10 @@ QWindowsContext::QWindowsContext() : - const QByteArray bv = qgetenv("QT_QPA_VERBOSE"); - if (!bv.isEmpty()) - QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv)); --#if QT_CONFIG(tabletevent) -- d->m_tabletSupport.reset(QWindowsTabletSupport::create()); -- qCDebug(lcQpaTablet) << "Tablet support: " << (d->m_tabletSupport.isNull() ? QStringLiteral("None") : d->m_tabletSupport->description()); --#endif - } + bool m_asyncExpose = false; +@@ -308,9 +305,6 @@ QWindowsContext::QWindowsContext() : QWindowsContext::~QWindowsContext() { -#if QT_CONFIG(tabletevent) - d->m_tabletSupport.reset(); // Destroy internal window before unregistering classes. -#endif unregisterWindowClasses(); if (d->m_oleInitializeResult == S_OK || d->m_oleInitializeResult == S_FALSE) OleUninitialize(); -@@ -337,12 +327,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions) +@@ -357,12 +351,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions) + bool QWindowsContext::initTablet(unsigned integrationOptions) + { + Q_UNUSED(integrationOptions); +-#if QT_CONFIG(tabletevent) +- d->m_tabletSupport.reset(QWindowsTabletSupport::create()); +- return true; +-#else + return false; +-#endif + } + + bool QWindowsContext::initPointer(unsigned integrationOptions) +@@ -383,12 +372,7 @@ bool QWindowsContext::initPointer(unsigned integrationOptions) void QWindowsContext::setTabletAbsoluteRange(int a) { -#if QT_CONFIG(tabletevent) - if (!d->m_tabletSupport.isNull()) - d->m_tabletSupport->setAbsoluteRange(a); -#else Q_UNUSED(a) -#endif } - int QWindowsContext::processDpiAwareness() -@@ -702,11 +687,7 @@ QWindowsScreenManager &QWindowsContext::screenManager() + void QWindowsContext::setDetectAltGrModifier(bool a) +@@ -799,11 +783,7 @@ QWindowsScreenManager &QWindowsContext::screenManager() QWindowsTabletSupport *QWindowsContext::tabletSupport() const { -#if QT_CONFIG(tabletevent) - return d->m_tabletSupport.data(); -#else return 0; -#endif } /*! -@@ -1112,10 +1093,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, +@@ -1288,10 +1268,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, *result = LRESULT(MA_NOACTIVATE); return true; } -#if QT_CONFIG(tabletevent) - if (!d->m_tabletSupport.isNull()) - d->m_tabletSupport->notifyActivate(); -#endif // QT_CONFIG(tabletevent) if (platformWindow->testFlag(QWindowsWindow::BlockedByModal)) if (const QWindow *modalWindow = QGuiApplication::modalWindow()) { QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(modalWindow); +-- +2.20.1.windows.1 + diff --git a/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch b/3rdparty/ext_qt/0002-Don-t-request-the-MIME-image-every-time-Windows-asks.patch similarity index 62% rename from 3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch rename to 3rdparty/ext_qt/0002-Don-t-request-the-MIME-image-every-time-Windows-asks.patch index b85a007d33..13826a32da 100644 --- a/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch +++ b/3rdparty/ext_qt/0002-Don-t-request-the-MIME-image-every-time-Windows-asks.patch @@ -1,37 +1,37 @@ -From 674cfce97c4972176d2bcb55d7013c0ac2190029 Mon Sep 17 00:00:00 2001 +From 9081571e58ceeaa4c623c83ecb41b04dfc7d90f9 Mon Sep 17 00:00:00 2001 From: Dmitry Kazakov Date: Tue, 21 Jun 2016 14:50:07 +0300 -Subject: [PATCH 1/2] Don't request the MIME image every time Windows asks for +Subject: [PATCH 2/4] Don't request the MIME image every time Windows asks for the list of supported types Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d4 --- - qtbase/src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++--- + src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -index a8264b5..90d646b 100644 ---- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -@@ -1081,12 +1081,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p +diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp +index ff0dccb0d9..a702a2a90f 100644 +--- a/src/plugins/platforms/windows/qwindowsmime.cpp ++++ b/src/plugins/platforms/windows/qwindowsmime.cpp +@@ -1082,12 +1082,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const { int cf = getCf(formatetc); + + if (cf != CF_DIBV5 && cf != CF_DIB && cf != CF_PNG) + return false; + if (!mimeData->hasImage()) return false; + const QImage image = qvariant_cast(mimeData->imageData()); - if (image.isNull()) - return false; - return cf == CF_DIBV5 || (cf == CF_DIB) || cf == int(CF_PNG); + return !image.isNull(); } bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const -- -2.6.4 +2.20.1.windows.1 diff --git a/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch b/3rdparty/ext_qt/0003-Hack-always-return-we-support-DIBV5.patch similarity index 60% rename from 3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch rename to 3rdparty/ext_qt/0003-Hack-always-return-we-support-DIBV5.patch index 77e57028bd..db93c33e36 100644 --- a/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch +++ b/3rdparty/ext_qt/0003-Hack-always-return-we-support-DIBV5.patch @@ -1,30 +1,30 @@ -From 5e5026beb420018266d3d00fdb530bb714a841a6 Mon Sep 17 00:00:00 2001 +From 6ce23924948d9697e07681bef44f0a47f9fd0d09 Mon Sep 17 00:00:00 2001 From: Dmitry Kazakov Date: Tue, 21 Jun 2016 14:50:47 +0300 -Subject: [PATCH 2/2] Hack: always return we support DIBV5 +Subject: [PATCH 3/4] Hack: always return we support DIBV5 Asking for the entire image may be too expensive Change-Id: I44c38fad73f1bb5859eb58b941054eeb6c3c6b66 --- - qtbase/src/plugins/platforms/windows/qwindowsmime.cpp | 4 +--- + src/plugins/platforms/windows/qwindowsmime.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -index 90d646b..ef97db7 100644 ---- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp -@@ -1052,9 +1052,7 @@ QVector QWindowsMimeImage::formatsForMime(const QString &mimeType, co +diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp +index a702a2a90f..03f8948a86 100644 +--- a/src/plugins/platforms/windows/qwindowsmime.cpp ++++ b/src/plugins/platforms/windows/qwindowsmime.cpp +@@ -1055,9 +1055,7 @@ QVector QWindowsMimeImage::formatsForMime(const QString &mimeType, co QVector formatetcs; if (mimeData->hasImage() && mimeType == QLatin1String("application/x-qt-image")) { //add DIBV5 if image has alpha channel. Do not add CF_PNG here as it will confuse MS Office (QTBUG47656). - QImage image = qvariant_cast(mimeData->imageData()); - if (!image.isNull() && image.hasAlphaChannel()) - formatetcs += setCf(CF_DIBV5); + formatetcs += setCf(CF_DIBV5); formatetcs += setCf(CF_DIB); } if (!formatetcs.isEmpty()) -- -2.6.4 +2.20.1.windows.1 diff --git a/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch b/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch deleted file mode 100644 index d7c8bfb7ae..0000000000 --- a/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 84a774e00e9d2535fdb8c798d7789130a9a008f6 Mon Sep 17 00:00:00 2001 -From: Michael Abrahams -Date: Wed, 22 Jun 2016 13:37:06 -0400 -Subject: [PATCH 3/4] Hack for fullscreen workaround - -https://bugreports.qt.io/browse/QTBUG-41309 ---- - qtbase/src/plugins/platforms/windows/qwindowswindow.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp -index 9c6cb53..d0829e3 100644 ---- a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp -+++ b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp -@@ -1769,7 +1769,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState) - const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE; - const bool wasSync = testFlag(SynchronousGeometryChangeEvent); - setFlag(SynchronousGeometryChangeEvent); -- SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf); -+ SetWindowPos(m_data.hwnd, HWND_TOP, r.left()-1, r.top()-1, r.width()+2, r.height()+2, swpf); - if (!wasSync) - clearFlag(SynchronousGeometryChangeEvent); - QWindowSystemInterface::handleGeometryChange(window(), r); --- -2.7.4.windows.1 - diff --git a/3rdparty/ext_qt/0004-Fix-debug-on-openGL-ES.patch b/3rdparty/ext_qt/0004-Fix-debug-on-openGL-ES.patch new file mode 100644 index 0000000000..b341b34d39 --- /dev/null +++ b/3rdparty/ext_qt/0004-Fix-debug-on-openGL-ES.patch @@ -0,0 +1,26 @@ +From 4c1e4e693307c3169c6db488ad6bf6cff6aae864 Mon Sep 17 00:00:00 2001 +From: Dmitry Kazakov +Date: Mon, 11 Feb 2019 18:07:20 +0300 +Subject: [PATCH 4/4] Fix debug on openGL ES + +Change-Id: I08d1adf87b305c380a0f2177edf4ff9de109e4d6 +--- + src/gui/opengl/qopengldebug.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp +index 2e628a2bd5..9f1bb76869 100644 +--- a/src/gui/opengl/qopengldebug.cpp ++++ b/src/gui/opengl/qopengldebug.cpp +@@ -1366,7 +1366,7 @@ bool QOpenGLDebugLogger::initialize() + + #define GET_DEBUG_PROC_ADDRESS(procName) \ + d->procName = reinterpret_cast< qt_ ## procName ## _t >( \ +- d->context->getProcAddress(#procName) \ ++ d->context->getProcAddress(d->context->isOpenGLES() ? (#procName "KHR") : (#procName)) \ + ); + + GET_DEBUG_PROC_ADDRESS(glDebugMessageControl); +-- +2.20.1.windows.1 + diff --git a/3rdparty/ext_qt/CMakeLists.txt b/3rdparty/ext_qt/CMakeLists.txt index 8326dd4533..40d5db8779 100644 --- a/3rdparty/ext_qt/CMakeLists.txt +++ b/3rdparty/ext_qt/CMakeLists.txt @@ -1,218 +1,213 @@ SET(EXTPREFIX_qt "${EXTPREFIX}") if (WIN32) list(APPEND _QT_conf -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-qml-debug -no-ssl -no-libproxy -no-system-proxies -no-icu -no-mtdev -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard # -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg # -opensource -confirm-license # -release -platform win32-g++ -prefix ${EXTPREFIX_qt} QMAKE_LFLAGS_APP+=${SECURITY_EXE_LINKER_FLAGS} QMAKE_LFLAGS_SHLIB+=${SECURITY_SHARED_LINKER_FLAGS} QMAKE_LFLAGS_SONAME+=${SECURITY_SHARED_LINKER_FLAGS} ) if (QT_ENABLE_DEBUG_INFO) # Set the option to build Qt with debugging info enabled list(APPEND _QT_conf -force-debug-info) endif(QT_ENABLE_DEBUG_INFO) if (QT_ENABLE_DYNAMIC_OPENGL) list(APPEND _QT_conf -opengl dynamic -angle) else (QT_ENABLE_DYNAMIC_OPENGL) list(APPEND _QT_conf -opengl desktop -no-angle) endif (QT_ENABLE_DYNAMIC_OPENGL) ExternalProject_Add( ext_qt DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} - URL https://download.qt.io/archive/qt/5.9/5.9.3/single/qt-everywhere-opensource-src-5.9.3.zip - URL_HASH SHA1=2d3c53cd9dc76a479873548921a20d3d9b6fb9ac - PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qtgui-private-headers.diff - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Hack-always-return-we-support-DIBV5.patch - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-for-fullscreen-workaround.patch - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qopengldebug-gles.patch - COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-189539-ANGLE-mingw-fix.patch - COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch - COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/QTBUG-57299.diff + URL https://download.qt.io/archive/qt/5.12/5.12.1/single/qt-everywhere-src-5.12.1.zip + URL_HASH SHA1=5ba3e56475912e8784f825fd8d0d139ec5eca8b3 + PATCH_COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-disable-wintab.patch + COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Don-t-request-the-MIME-image-every-time-Windows-asks.patch + COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-always-return-we-support-DIBV5.patch + COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0004-Fix-debug-on-openGL-ES.patch INSTALL_DIR ${EXTPREFIX_qt} CONFIGURE_COMMAND /configure.bat ${_QT_conf} BUILD_COMMAND mingw32-make -j${SUBMAKE_JOBS} INSTALL_COMMAND mingw32-make -j${SUBMAKE_JOBS} install UPDATE_COMMAND "" # Use a short name to reduce the chance of exceeding path length limit SOURCE_DIR s BINARY_DIR b DEPENDS ext_patch ) elseif (NOT APPLE) ExternalProject_Add( ext_qt DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} URL https://download.qt.io/official_releases/qt/5.10/5.10.0/single/qt-everywhere-src-5.10.0.tar.xz URL_MD5 c5e275ab0ed7ee61d0f4b82cd471770d #PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qt-no-motion-compression.diff CONFIGURE_COMMAND /configure -prefix ${EXTPREFIX_qt} -opensource -confirm-license -verbose -nomake examples -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtandroidextras -skip qtserialport -skip qtdatavis3d -skip qtvirtualkeyboard -skip qtspeech -skip qtsensors -skip qtgamepad -skip qtscxml -skip qtremoteobjects -skip qtxmlpatterns -skip qtnetworkauth -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtpurchasing -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard INSTALL_DIR ${EXTPREFIX_qt} BUILD_COMMAND $(MAKE) INSTALL_COMMAND $(MAKE) install UPDATE_COMMAND "" BUILD_IN_SOURCE 1 ) else( APPLE ) # XCODE_VERSION is set by CMake when using the Xcode generator, otherwise we need # to detect it manually here. if (NOT XCODE_VERSION) execute_process( COMMAND xcodebuild -version OUTPUT_VARIABLE xcodebuild_version OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_FILE /dev/null ) string(REGEX MATCH "Xcode ([0-9]([.][0-9])+)" version_match ${xcodebuild_version}) if (version_match) message(STATUS "${EXTPREFIX_qt}:Identified Xcode Version: ${CMAKE_MATCH_1}") set(XCODE_VERSION ${CMAKE_MATCH_1}) else() # If detecting Xcode version failed, set a crazy high version so we default # to the newest. set(XCODE_VERSION 99) message(WARNING "${EXTPREFIX_qt}:Failed to detect the version of an installed copy of Xcode, falling back to highest supported version. Set XCODE_VERSION to override.") endif(version_match) endif(NOT XCODE_VERSION) # ------------------------------------------------------------------------------- # Verify the Xcode installation on Mac OS like Qt5.7 does/will # If not stop now, the system isn't configured correctly for Qt. # No reason to even proceed. # ------------------------------------------------------------------------------- set(XCSELECT_OUTPUT) find_program(XCSELECT_PROGRAM "xcode-select") if(XCSELECT_PROGRAM) message(STATUS "${EXTPREFIX_qt}:Found XCSELECT_PROGRAM as ${XCSELECT_PROGRAM}") set(XCSELECT_COMMAND ${XCSELECT_PROGRAM} "--print-path") execute_process( COMMAND ${XCSELECT_COMMAND} RESULT_VARIABLE XCSELECT_COMMAND_RESULT OUTPUT_VARIABLE XCSELECT_COMMAND_OUTPUT ERROR_FILE /dev/null ) if(NOT XCSELECT_COMMAND_RESULT) # returned 0, we're ok. string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" XCSELECT_COMMAND_OUTPUT ${XCSELECT_COMMAND_OUTPUT}) else() string(REPLACE ";" " " XCSELECT_COMMAND_STR "${XCSELECT_COMMAND}") # message(STATUS "${XCSELECT_COMMAND_STR}") message(FATAL_ERROR "${EXTPREFIX_qt}:${XCSELECT_PROGRAM} test failed with status ${XCSELECT_COMMAND_RESULT}") endif() else() message(FATAL_ERROR "${EXTPREFIX_qt}:${XCSELECT_PROGRAM} not found. No Xcode is selected. Use xcode-select -switch to choose an Xcode version") endif() # Belts and suspenders # Beyond all the Xcode and Qt version checking, the proof of the pudding # lies in the success/failure of this command: xcrun --find xcrun. # On failure a patch is necessary, otherwise we're ok # So hard check xcrun now... set(XCRUN_OUTPUT) find_program(XCRUN_PROGRAM "xcrun") if(XCRUN_PROGRAM) message(STATUS "${EXTPREFIX_qt}:Found XCRUN_PROGRAM as ${XCRUN_PROGRAM}") set(XCRUN_COMMAND ${XCRUN_PROGRAM} "--find xcrun") execute_process( COMMAND ${XCRUN_COMMAND} RESULT_VARIABLE XCRUN_COMMAND_RESULT OUTPUT_VARIABLE XCRUN_COMMAND_OUTPUT ERROR_FILE /dev/null ) if(NOT XCRUN_COMMAND_RESULT) # returned 0, we're ok. string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" XCRUN_COMMAND_OUTPUT ${XCRUN_COMMAND_OUTPUT}) else() string(REPLACE ";" " " XCRUN_COMMAND_STR "${XCRUN_COMMAND}") # message(STATUS "${XCRUN_COMMAND_STR}") message(STATUS "${EXTPREFIX_qt}:xcrun test failed with status ${XCRUN_COMMAND_RESULT}") endif() else() message(STATUS "${EXTPREFIX_qt}:xcrun not found -- ${XCRUN_PROGRAM}") endif() # # Now configure ext_qt accordingly # if ((XCRUN_COMMAND_RESULT) AND (NOT (XCODE_VERSION VERSION_LESS 8.0.0))) # Fix Xcode xcrun related issue. # NOTE: This should be fixed by Qt 5.7.1 see here: http://code.qt.io/cgit/qt/qtbase.git/commit/?h=dev&id=77a71c32c9d19b87f79b208929e71282e8d8b5d9 # NOTE: but no one's holding their breath. set(ext_qt_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff COMMAND ${PATCH_COMMAND} -p1 -b -d /qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/mac_standardpaths_qtbug-61159.diff #COMMAND ${PATCH_COMMAND} -p1 -b -d /qtbase/mkspecs/features/mac -i ${CMAKE_CURRENT_SOURCE_DIR}/mac-default.patch ) message(STATUS "${EXTPREFIX_qt}:Additional patches injected.") else() # No extra patches will be applied # NOTE: defaults for some untested scenarios like xcrun fails and xcode_version < 8. # NOTE: that is uncharted territory and (hopefully) a very unlikely scenario... set(ext_qt_PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff) endif() # Qt is big - try and parallelize if at all possible include(ProcessorCount) ProcessorCount(NUM_CORES) if(NOT NUM_CORES EQUAL 0) if (NUM_CORES GREATER 2) # be nice... MATH( EXPR NUM_CORES "${NUM_CORES} - 2" ) endif() set(PARALLEL_MAKE "make;-j${NUM_CORES}") message(STATUS "${EXTPREFIX_qt}:Parallelized make: ${PARALLEL_MAKE}") else() set(PARALLEL_MAKE "make") endif() ExternalProject_Add(ext_qt DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR} LOG_DOWNLOAD ON LOG_UPDATE ON LOG_CONFIGURE ON LOG_BUILD ON LOG_TEST ON LOG_INSTALL ON BUILD_IN_SOURCE ON URL https://download.qt.io/official_releases/qt/5.10/5.10.0/single/qt-everywhere-src-5.10.0.tar.xz URL_MD5 c5e275ab0ed7ee61d0f4b82cd471770d PATCH_COMMAND ${ext_qt_PATCH_COMMAND} INSTALL_DIR ${EXTPREFIX_qt} CONFIGURE_COMMAND /configure -skip qt3d -skip qtactiveqt -skip qtcanvas3d -skip qtconnectivity -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtsensors -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtxmlpatterns -no-sql-sqlite -skip qtcharts -skip qtdatavis3d -skip qtgamepad -skip qtnetworkauth -skip qtpurchasing -skip qtremoteobjects -skip qtscxml -skip qtserialbus -skip qtspeech -skip qtvirtualkeyboard -nomake examples -nomake tools -no-compile-examples -no-dbus -no-iconv -no-qml-debug -no-libproxy -no-system-proxies -no-icu -no-mtdev -system-zlib -qt-pcre -opensource -confirm-license -prefix ${EXTPREFIX_qt} BUILD_COMMAND ${PARALLEL_MAKE} INSTALL_COMMAND make install UPDATE_COMMAND "" BUILD_IN_SOURCE 1 ) endif() diff --git a/3rdparty/ext_qt/QTBUG-57299.diff b/3rdparty/ext_qt/QTBUG-57299.diff deleted file mode 100644 index 19d62bda7a..0000000000 --- a/3rdparty/ext_qt/QTBUG-57299.diff +++ /dev/null @@ -1,111 +0,0 @@ -From 7a5828621ce1f44c6af39257bc62cf6fac5f22c4 Mon Sep 17 00:00:00 2001 -From: Friedemann Kleint -Date: Fri, 26 Jan 2018 08:37:40 +0100 -Subject: [PATCH] Windows/QSaveFile: Fix locking issues on Dropbox drives - -Add a flag to QTemporaryFileEngine causing the file to be opened in -non-shared mode, preventing renaming failures caused by the Dropbox -driver accessing it. - -Task-number: QTBUG-57299 -Change-Id: Id7afc3559fd15784d4166efbbd057d592b5e0ab2 -Reviewed-by: Oswald Buddenhagen -Reviewed-by: Oliver Wolff -Reviewed-by: Thiago Macieira -(cherry picked from commit fe5edcee602f0ab2912bbdd1a21f4309ed7dbfd6) ---- - src/corelib/io/qsavefile.cpp | 2 +- - src/corelib/io/qtemporaryfile.cpp | 11 +++++++---- - src/corelib/io/qtemporaryfile_p.h | 5 +++++ - 3 files changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp -index 3f45ca5f913..aaf3d1f5fb1 100644 ---- a/src/corelib/io/qsavefile.cpp -+++ b/src/corelib/io/qsavefile.cpp -@@ -231,7 +231,7 @@ bool QSaveFile::open(OpenMode mode) - d->finalFileName = existingFile.filePath(); - } - -- d->fileEngine = new QTemporaryFileEngine; -+ d->fileEngine = new QTemporaryFileEngine(QTemporaryFileEngine::Win32NonShared); - // if the target file exists, we'll copy its permissions below, - // but until then, let's ensure the temporary file is not accessible - // to a third party -diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp -index 8a99873fee1..4712e65a419 100644 ---- a/src/corelib/io/qtemporaryfile.cpp -+++ b/src/corelib/io/qtemporaryfile.cpp -@@ -117,7 +117,7 @@ typedef int NativeFileHandle; - */ - static bool createFileFromTemplate(NativeFileHandle &file, - QFileSystemEntry::NativePath &path, size_t pos, size_t length, quint32 mode, -- QSystemError &error) -+ int flags, QSystemError &error) - { - Q_ASSERT(length != 0); - Q_ASSERT(pos < size_t(path.length())); -@@ -151,16 +151,18 @@ static bool createFileFromTemplate(NativeFileHandle &file, - // Atomically create file and obtain handle - #if defined(Q_OS_WIN) - Q_UNUSED(mode); -+ const DWORD shareMode = (flags & QTemporaryFileEngine::Win32NonShared) -+ ? 0u : (FILE_SHARE_READ | FILE_SHARE_WRITE); - - # ifndef Q_OS_WINRT - file = CreateFile((const wchar_t *)path.constData(), - GENERIC_READ | GENERIC_WRITE, -- FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW, -+ shareMode, NULL, CREATE_NEW, - FILE_ATTRIBUTE_NORMAL, NULL); - # else // !Q_OS_WINRT - file = CreateFile2((const wchar_t *)path.constData(), - GENERIC_READ | GENERIC_WRITE, -- FILE_SHARE_READ | FILE_SHARE_WRITE, CREATE_NEW, -+ shareMode, CREATE_NEW, - NULL); - # endif // Q_OS_WINRT - -@@ -182,6 +184,7 @@ static bool createFileFromTemplate(NativeFileHandle &file, - return false; - } - #else // POSIX -+ Q_UNUSED(flags) - file = QT_OPEN(path.constData(), - QT_OPEN_CREAT | O_EXCL | QT_OPEN_RDWR | QT_OPEN_LARGEFILE, - static_cast(mode)); -@@ -342,7 +345,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) - NativeFileHandle &file = d->fd; - #endif - -- if (!createFileFromTemplate(file, filename, phPos, phLength, fileMode, error)) { -+ if (!createFileFromTemplate(file, filename, phPos, phLength, fileMode, flags, error)) { - setError(QFile::OpenError, error.toString()); - return false; - } -diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h -index 7f365f0e8a1..b0fab3a2558 100644 ---- a/src/corelib/io/qtemporaryfile_p.h -+++ b/src/corelib/io/qtemporaryfile_p.h -@@ -85,6 +85,10 @@ class QTemporaryFileEngine : public QFSFileEngine - { - Q_DECLARE_PRIVATE(QFSFileEngine) - public: -+ enum Flags { Win32NonShared = 0x1 }; -+ -+ explicit QTemporaryFileEngine(int _flags = 0) : flags(_flags) {} -+ - void initialize(const QString &file, quint32 mode, bool nameIsTemplate = true) - { - Q_D(QFSFileEngine); -@@ -109,6 +113,7 @@ public: - bool close() override; - - quint32 fileMode; -+ int flags; - bool filePathIsTemplate; - bool filePathWasTemplate; - }; --- -2.16.3 - diff --git a/3rdparty/ext_qt/gerrit-189539-ANGLE-mingw-fix.patch b/3rdparty/ext_qt/gerrit-189539-ANGLE-mingw-fix.patch deleted file mode 100644 index 93bb2a47ea..0000000000 --- a/3rdparty/ext_qt/gerrit-189539-ANGLE-mingw-fix.patch +++ /dev/null @@ -1,145 +0,0 @@ -diff --git a/qtbase/src/angle/src/common/common.pri b/qtbase/src/angle/src/common/common.pri -index c1fad14951..6a558a957b 100644 ---- a/qtbase/src/angle/src/common/common.pri -+++ b/qtbase/src/angle/src/common/common.pri -@@ -21,20 +21,6 @@ lib_replace.replace = \$\$\$\$[QT_INSTALL_LIBS] - lib_replace.CONFIG = path - QMAKE_PRL_INSTALL_REPLACE += lib_replace - --# DirectX is included in the Windows 8 Kit, but everything else requires the DX SDK. --winrt|msvc { -- FXC = fxc.exe --} else { -- DX_DIR = $$(DXSDK_DIR) -- isEmpty(DX_DIR) { -- error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.") -- } -- -- equals(QMAKE_TARGET.arch, x86_64) { -- FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\" -- } else { -- FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\" -- } --} -+FXC = $$QMAKE_FXC_LOCATION - - static: DEFINES *= LIBGLESV2_EXPORT_H_ ANGLE_EXPORT= -diff --git a/qtbase/src/gui/configure.json b/qtbase/src/gui/configure.json -index 28c8034c75..77cfb6b592 100644 ---- a/qtbase/src/gui/configure.json -+++ b/qtbase/src/gui/configure.json -@@ -615,11 +615,14 @@ - "label": "DirectX SDK", - "type": "directX", - "files": [ -- "d3dcompiler.h", -- "d3d11.lib", -- "fxc.exe" -+ "d3dcompiler.h" - ] - }, -+ "fxc": { -+ "label": "DirectX Shader Compiler", -+ "type": "fxc", -+ "log": "value" -+ }, - "egl-x11": { - "label": "EGL on X11", - "type": "compile", -@@ -842,10 +845,11 @@ - "angle": { - "label": "ANGLE", - "autoDetect": "features.opengles2 || features.opengl-dynamic", -- "condition": "config.win32 && tests.directx", -+ "condition": "config.win32 && tests.directx && tests.fxc", - "output": [ - "publicFeature", -- { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" } -+ { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" }, -+ { "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" } - ] - }, - "angle_d3d11_qdtd": { -diff --git a/qtbase/src/gui/configure.pri b/qtbase/src/gui/configure.pri -index aaffa835dc..566686b4f6 100644 ---- a/qtbase/src/gui/configure.pri -+++ b/qtbase/src/gui/configure.pri -@@ -15,22 +15,12 @@ defineTest(qtConfLibrary_freetype) { - return(true) - } - --# Check for Direct X SDK (include, lib, and direct shader compiler 'fxc'). --# Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the --# DXSDK_DIR variable. Starting with Windows Kit 8, it is included in --# the Windows SDK. Checking for the header is not sufficient, since it --# is also present in MinGW. -+# For MSVC everything DirectX related is included in Windows Kit >= 8, -+# so we do not do any magic in this case. -+# For MinGW we need the shader compiler (fxc.exe), which -+# are not part of MinGW. They can either be obtained from a DirectX SDK -+# (keep the old approach working) or Windows Kit (>= 8). - defineTest(qtConfTest_directX) { -- dxdir = $$getenv("DXSDK_DIR") -- !isEmpty(dxdir) { -- EXTRA_INCLUDEPATH += $$dxdir/include -- equals(QT_ARCH, x86_64): \ -- EXTRA_LIBDIR += $$dxdir/lib/x64 -- else: \ -- EXTRA_LIBDIR += $$dxdir/lib/x86 -- EXTRA_PATH += $$dxdir/Utilities/bin/x86 -- } -- - $$qtConfEvaluate("features.sse2") { - ky = $$size($${1}.files._KEYS_) - $${1}.files._KEYS_ += $$ky -@@ -42,6 +32,50 @@ defineTest(qtConfTest_directX) { - return(false) - } - -+defineTest(qtConfTest_fxc) { -+ !mingw { -+ fxc = $$qtConfFindInPath("fxc.exe") -+ } else { -+ dxdir = $$getenv("DXSDK_DIR") -+ winkitdir = $$getenv("WindowsSdkDir") -+ !isEmpty(dxdir) { -+ equals(QT_ARCH, x86_64): \ -+ fxc = $$dxdir/Utilities/bin/x64/fxc.exe -+ else: \ -+ fxc = $$dxdir/Utilities/bin/x86/fxc.exe -+ } else: !isEmpty(winkitdir) { -+ equals(QT_ARCH, x86_64): \ -+ fxc = $$winkitdir/bin/x64/fxc.exe -+ else: \ -+ fxc = $$winkitdir/bin/x86/fxc.exe -+ -+ !exists($$fxc) { -+ binsubdirs = $$files($$winkitdir/bin/*) -+ for (dir, binsubdirs) { -+ equals(QT_ARCH, x86_64): \ -+ finalBinDir = $$dir/x64 -+ else: \ -+ finalBinDir = $$dir/x86 -+ -+ fxc = $${finalBinDir}/fxc.exe -+ exists($$fxc) { -+ break() -+ } -+ } -+ } -+ } -+ } -+ -+ !isEmpty(fxc):exists($$fxc) { -+ $${1}.value = $$fxc -+ export($${1}.value) -+ $${1}.cache += value -+ export($${1}.cache) -+ return(true) -+ } -+ return(false) -+} -+ - defineTest(qtConfTest_xkbConfigRoot) { - qtConfTest_getPkgConfigVariable($${1}): return(true) - diff --git a/3rdparty/ext_qt/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch b/3rdparty/ext_qt/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch deleted file mode 100644 index ff9ddf96e1..0000000000 --- a/3rdparty/ext_qt/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit 644ff9428853f138649de0419de4b49bf41bc738 -Author: Oliver Wolff -Date: Tue Nov 28 13:30:52 2017 +0100 - - ANGLE: D3D11: Fix shared handle support detection for WARP when MinGW is used - - The MinGW version we support supports IsWindows8OrGreater so that we can - check the windows version properly. As the OpenGL detection falls back - to WARP in case of RDP it was possible, that shared handles were wrongly - stated as supported, which caused crashes in users' code. - - Task-number: QTBUG-64657 - Change-Id: Iaca2bd169f2764cf6ec68a1d36112a735246b29a - Reviewed-by: Andre de la Rocha - Reviewed-by: Andy Shaw - (cherry picked from commit 6508fdca1dcc7105947befadba272d0fd4bbc27f) - -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 0173311bc6..5118bdbe9c 100644 ---- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp -+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp -@@ -2645,7 +2645,7 @@ bool Renderer11::getShareHandleSupport() const - - if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP) - { --#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__) -+#ifndef ANGLE_ENABLE_WINDOWS_STORE - if (!IsWindows8OrGreater()) - { - // WARP on Windows 7 doesn't support shared handles -diff --git a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch -index dc091b0497..f42ff2141b 100644 ---- a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch -+++ b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch -@@ -405,15 +405,6 @@ index ea84783..62badcc 100644 - - if (mD3d11Module) - { --@@ -2618,7 +2642,7 @@ bool Renderer11::getShareHandleSupport() const -- -- if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP) -- { ---#ifndef ANGLE_ENABLE_WINDOWS_STORE --+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__) -- if (!IsWindows8OrGreater()) -- { -- // WARP on Windows 7 doesn't support shared handles - diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h - index 62e9816..b4e7761 100644 - --- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h diff --git a/3rdparty/ext_qt/qopengldebug-gles.patch b/3rdparty/ext_qt/qopengldebug-gles.patch deleted file mode 100644 index 448364ebbf..0000000000 --- a/3rdparty/ext_qt/qopengldebug-gles.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/qtbase/src/gui/opengl/qopengldebug.cpp b/qtbase/src/gui/opengl/qopengldebug.cpp -index f6c3af37dd..70bf7530e1 100644 ---- a/qtbase/src/gui/opengl/qopengldebug.cpp -+++ b/qtbase/src/gui/opengl/qopengldebug.cpp -@@ -1413,7 +1413,7 @@ bool QOpenGLDebugLogger::initialize() - - #define GET_DEBUG_PROC_ADDRESS(procName) \ - d->procName = reinterpret_cast< qt_ ## procName ## _t >( \ -- d->context->getProcAddress(#procName) \ -+ d->context->getProcAddress(d->context->isOpenGLES() ? (#procName "KHR") : (#procName)) \ - ); - - GET_DEBUG_PROC_ADDRESS(glDebugMessageControl); diff --git a/3rdparty/ext_qt/qtgui-private-headers.diff b/3rdparty/ext_qt/qtgui-private-headers.diff deleted file mode 100644 index 3e719feab6..0000000000 --- a/3rdparty/ext_qt/qtgui-private-headers.diff +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/qtbase/mkspecs/features/create_cmake.prf b/qtbase/mkspecs/features/create_cmake.prf -index 11fb52a..aec9ea9 100644 ---- a/qtbase/mkspecs/features/create_cmake.prf -+++ b/qtbase/mkspecs/features/create_cmake.prf -@@ -30,7 +30,6 @@ CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE}) - - split_incpath { - CMAKE_ADD_SOURCE_INCLUDE_DIRS = true -- CMAKE_NO_PRIVATE_INCLUDES = true # Don't add private includes in the build dir which don't exist - CMAKE_SOURCE_INCLUDES = \ - $$cmakeTargetPaths($$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME}) - CMAKE_SOURCE_PRIVATE_INCLUDES = \