[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [krita] 3rdparty/ext_qt: Update Qt to 5.11 on Windows and build with ssl
From: Boudewijn Rempt <null () kde ! org>
Date: 2018-09-10 9:41:33
Message-ID: E1fzIhJ-0000yu-3p () code ! kde ! org
[Download RAW message or body]
Git commit 9a1849eb160627faa2e4f1da9a433d257ec8773a by Boudewijn Rempt.
Committed on 10/09/2018 at 09:41.
Pushed by rempt into branch 'master'.
Update Qt to 5.11 on Windows and build with ssl
SSL is needed for the news widget.
M +9 -9 3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
A +25 -0 3rdparty/ext_qt/0001-adapted-to-changed-C-API.patch
M +7 -7 3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch
M +15 -15 3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch
M +10 -28 3rdparty/ext_qt/CMakeLists.txt
D +0 -111 3rdparty/ext_qt/QTBUG-57299.diff
M +1466 -6 3rdparty/ext_qt/disable-wintab.diff
D +0 -145 3rdparty/ext_qt/gerrit-189539-ANGLE-mingw-fix.patch
M +156 -47 3rdparty/ext_qt/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch
D +0 -11 3rdparty/ext_qt/mac-default.patch
D +0 -59 3rdparty/ext_qt/mac_standardpaths_qtbug-61159.diff
M +25 -18 3rdparty/ext_qt/macdeploy-qt.diff
M +13 -1 3rdparty/ext_qt/qopengldebug-gles.patch
D +0 -20 3rdparty/ext_qt/qt-no-motion-compression.diff
M +25 -6 3rdparty/ext_qt/qtgui-private-headers.diff
https://commits.kde.org/krita/9a1849eb160627faa2e4f1da9a433d257ec8773a
diff --git a/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch \
b/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch \
index b85a007d330..3087b975894 100644
--- a/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
+++ b/3rdparty/ext_qt/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
@@ -1,19 +1,19 @@
-From 674cfce97c4972176d2bcb55d7013c0ac2190029 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <dimula73@gmail.com>
-Date: Tue, 21 Jun 2016 14:50:07 +0300
-Subject: [PATCH 1/2] Don't request the MIME image every time Windows asks for
- the list of supported types
+From 715db09b9ec282d149fffc41b16eef68c786c0cb Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:46:49 +0200
+Subject: [PATCH 3/8] Subject: [PATCH 1/2] Don't request the MIME image every
+ time Windows asks for the list of supported types
-Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d4
+Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d
---
qtbase/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
+index 0439797a7..f63376bdf 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 +@@ -1084,12 +1084,15 @@ bool \
QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p bool \
QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData \
*mimeData) const {
int cf = getCf(formatetc);
@@ -33,5 +33,5 @@ index a8264b5..90d646b 100644
bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData \
*mimeData, STGMEDIUM * pmedium) const
--
-2.6.4
+2.17.1
diff --git a/3rdparty/ext_qt/0001-adapted-to-changed-C-API.patch \
b/3rdparty/ext_qt/0001-adapted-to-changed-C-API.patch new file mode 100644
index 00000000000..1aec81ce401
--- /dev/null
+++ b/3rdparty/ext_qt/0001-adapted-to-changed-C-API.patch
@@ -0,0 +1,25 @@
+From 7edf7f22415082303eb6df2c0502152e40cc5135 Mon Sep 17 00:00:00 2001
+From: Dirk Farin <farin@struktur.de>
+Date: Fri, 25 May 2018 15:59:52 +0200
+Subject: [PATCH 1/3] adapted to changed C++ API
+
+---
+ plugins/impex/heif/HeifExport.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/impex/heif/HeifExport.cpp b/plugins/impex/heif/HeifExport.cpp
+index 3c9fae1736..2f4629fc95 100644
+--- a/plugins/impex/heif/HeifExport.cpp
++++ b/plugins/impex/heif/HeifExport.cpp
+@@ -93,7 +93,7 @@ public:
+ {
+ }
+
+- heif_error write(heif::Context&, const void* data, size_t size) override {
++ heif_error write(const void* data, size_t size) override {
+ qint64 n = m_io->write((const char*)data,size);
+ if (n != (qint64)size) {
+ QString error = m_io->errorString();
+--
+2.14.1
+
diff --git a/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch \
b/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch index \
77e57028bd6..8ee9e625f6d 100644
--- a/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch
+++ b/3rdparty/ext_qt/0002-Hack-always-return-we-support-DIBV5.patch
@@ -1,7 +1,7 @@
-From 5e5026beb420018266d3d00fdb530bb714a841a6 Mon Sep 17 00:00:00 2001
-From: Dmitry Kazakov <dimula73@gmail.com>
-Date: Tue, 21 Jun 2016 14:50:47 +0300
-Subject: [PATCH 2/2] Hack: always return we support DIBV5
+From 2101065bc63a4809cf62ce83b318d6fa16cbb6a2 Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:48:03 +0200
+Subject: [PATCH 4/8] Hack: always return we support DIBV5
Asking for the entire image may be too expensive
@@ -11,10 +11,10 @@ Change-Id: I44c38fad73f1bb5859eb58b941054eeb6c3c6b66
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
+index f63376bdf..3b5c900b6 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
-@@ -1052,9 +1052,7 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const \
QString &mimeType, co +@@ -1055,9 +1055,7 @@ QVector<FORMATETC> \
QWindowsMimeImage::formatsForMime(const QString &mimeType, co QVector<FORMATETC> \
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). @@ -26,5 +26,5 @@ index 90d646b..ef97db7 100644
}
if (!formatetcs.isEmpty())
--
-2.6.4
+2.17.1
diff --git a/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch \
b/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch index \
d7c8bfb7aed..88e31714034 100644
--- a/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch
+++ b/3rdparty/ext_qt/0003-Hack-for-fullscreen-workaround.patch
@@ -1,7 +1,7 @@
-From 84a774e00e9d2535fdb8c798d7789130a9a008f6 Mon Sep 17 00:00:00 2001
-From: Michael Abrahams <miabraha@gmail.com>
-Date: Wed, 22 Jun 2016 13:37:06 -0400
-Subject: [PATCH 3/4] Hack for fullscreen workaround
+From b7fe5771ed409dfa74b0ea1ace1d98e1562f134c Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:48:49 +0200
+Subject: [PATCH 5/8] Subject: [PATCH 3/4] Hack for fullscreen workaround
https://bugreports.qt.io/browse/QTBUG-41309
---
@@ -9,18 +9,18 @@ https://bugreports.qt.io/browse/QTBUG-41309
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
+index 3909c64c5..4c794f746 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);
+@@ -1956,7 +1956,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowStates \
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);
+ clearFlag(MaximizeToFullScreen);
--
-2.7.4.windows.1
+2.17.1
diff --git a/3rdparty/ext_qt/CMakeLists.txt b/3rdparty/ext_qt/CMakeLists.txt
index 8326dd4533b..89f8b034d05 100644
--- a/3rdparty/ext_qt/CMakeLists.txt
+++ b/3rdparty/ext_qt/CMakeLists.txt
@@ -3,9 +3,9 @@ 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 qtwebchannel -skip qtwebsockets
-skip qtxmlpatterns -no-sql-sqlite -nomake examples -nomake tools
- -no-compile-examples -no-dbus -no-iconv -no-qml-debug -no-ssl
+ -no-compile-examples -no-dbus -no-iconv -no-qml-debug
-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
@@ -33,17 +33,15 @@ if (WIN32)
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
+ URL https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.zip
+ URL_HASH SHA1=9b5464e2f42d7a673834950d0f440ca0d048f6a2
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 + COMMAND ${PATCH_COMMAND} \
-p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat ${_QT_conf}
@@ -60,9 +58,8 @@ 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 + URL \
https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
+ URL_MD5 c6f0854d7de7bde80cfd8cc85bb7152b
CONFIGURE_COMMAND <SOURCE_DIR>/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}
@@ -159,21 +156,6 @@ else( APPLE )
#
# 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 <SOURCE_DIR>/qtbase -i \
${CMAKE_CURRENT_SOURCE_DIR}/mac_standardpaths_qtbug-61159.diff
- #COMMAND ${PATCH_COMMAND} -p1 -b -d \
<SOURCE_DIR>/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)
@@ -201,10 +183,10 @@ else( APPLE )
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
+ URL https://download.qt.io/official_releases/qt/5.11/5.11.1/single/qt-everywhere-src-5.11.1.tar.xz
+ URL_MD5 c6f0854d7de7bde80cfd8cc85bb7152b
- PATCH_COMMAND ${ext_qt_PATCH_COMMAND}
+ PATCH_COMMAND ${PATCH_COMMAND} -p1 -i \
${CMAKE_CURRENT_SOURCE_DIR}/macdeploy-qt.diff
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure
diff --git a/3rdparty/ext_qt/QTBUG-57299.diff b/3rdparty/ext_qt/QTBUG-57299.diff
deleted file mode 100644
index 19d62bda7a8..00000000000
--- 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 <Friedemann.Kleint@qt.io>
-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 <oswald.buddenhagen@qt.io>
-Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-(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_t>(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/disable-wintab.diff \
b/3rdparty/ext_qt/disable-wintab.diff index 7a986d5da45..5ffed56ae13 100644
--- a/3rdparty/ext_qt/disable-wintab.diff
+++ b/3rdparty/ext_qt/disable-wintab.diff
@@ -1,8 +1,19 @@
+From c6a6e0d1a3207c5379a4c4118dffe6801f4eb044 Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:41:26 +0200
+Subject: [PATCH 1/8] disable-wintab.diff
+
+---
+ .../platforms/windows/qwindowscontext.cpp | 23 -
+ .../windows/qwindowscontext.cpp.orig | 1440 +++++++++++++++++
+ 2 files changed, 1440 insertions(+), 23 deletions(-)
+ create mode 100644 qtbase/src/plugins/platforms/windows/qwindowscontext.cpp.orig
+
diff --git a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp \
b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
-index e6e6ee8b1a..89143b6d3f 100644
+index 98a4b261f..946df61d8 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
-@@ -240,9 +240,6 @@ struct QWindowsContextPrivate {
+@@ -242,9 +242,6 @@ struct QWindowsContextPrivate {
QWindowsMimeConverter m_mimeConverter;
QWindowsScreenManager m_screenManager;
QSharedPointer<QWindowCreationContext> m_creationContext;
@@ -10,8 +21,8 @@ index e6e6ee8b1a..89143b6d3f 100644
- QScopedPointer<QWindowsTabletSupport> m_tabletSupport;
-#endif
const HRESULT m_oleInitializeResult;
- const QByteArray m_eventType;
QWindow *m_lastActiveWindow = nullptr;
+ bool m_asyncExpose = false;
@@ -281,17 +278,10 @@ QWindowsContext::QWindowsContext() :
const QByteArray bv = qgetenv("QT_QPA_VERBOSE");
if (!bv.isEmpty())
@@ -30,7 +41,7 @@ index e6e6ee8b1a..89143b6d3f 100644
unregisterWindowClasses();
if (d->m_oleInitializeResult == S_OK || d->m_oleInitializeResult == S_FALSE)
OleUninitialize();
-@@ -337,12 +327,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
+@@ -332,12 +322,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
void QWindowsContext::setTabletAbsoluteRange(int a)
{
@@ -43,7 +54,7 @@ index e6e6ee8b1a..89143b6d3f 100644
}
int QWindowsContext::processDpiAwareness()
-@@ -702,11 +687,7 @@ QWindowsScreenManager &QWindowsContext::screenManager()
+@@ -708,11 +693,7 @@ QWindowsScreenManager &QWindowsContext::screenManager()
QWindowsTabletSupport *QWindowsContext::tabletSupport() const
{
@@ -55,7 +66,7 @@ index e6e6ee8b1a..89143b6d3f 100644
}
/*!
-@@ -1112,10 +1093,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
+@@ -1139,10 +1120,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
*result = LRESULT(MA_NOACTIVATE);
return true;
}
@@ -66,3 +77,1452 @@ index e6e6ee8b1a..89143b6d3f 100644
if (platformWindow->testFlag(QWindowsWindow::BlockedByModal))
if (const QWindow *modalWindow = QGuiApplication::modalWindow()) {
QWindowsWindow *platformWindow = \
QWindowsWindow::windowsWindowOf(modalWindow); +diff --git \
a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp.orig \
b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp.orig +new file mode 100644
+index 000000000..98a4b261f
+--- /dev/null
++++ b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp.orig
+@@ -0,0 +1,1440 @@
++/****************************************************************************
++**
++** Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch>
++** Copyright (C) 2016 The Qt Company Ltd.
++** Contact: https://www.qt.io/licensing/
++**
++** This file is part of the plugins of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:LGPL$
++** Commercial License Usage
++** Licensees holding valid commercial Qt licenses may use this file in
++** accordance with the commercial license agreement provided with the
++** Software or, alternatively, in accordance with the terms contained in
++** a written agreement between you and The Qt Company. For licensing terms
++** and conditions see https://www.qt.io/terms-conditions. For further
++** information use the contact form at https://www.qt.io/contact-us.
++**
++** GNU Lesser General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU Lesser
++** General Public License version 3 as published by the Free Software
++** Foundation and appearing in the file LICENSE.LGPL3 included in the
++** packaging of this file. Please review the following information to
++** ensure the GNU Lesser General Public License version 3 requirements
++** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
++**
++** GNU General Public License Usage
++** Alternatively, this file may be used under the terms of the GNU
++** General Public License version 2.0 or (at your option) the GNU General
++** Public license version 3 or any later version approved by the KDE Free
++** Qt Foundation. The licenses are as published by the Free Software
++** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
++** included in the packaging of this file. Please review the following
++** information to ensure the GNU General Public License requirements will
++** be met: https://www.gnu.org/licenses/gpl-2.0.html and
++** https://www.gnu.org/licenses/gpl-3.0.html.
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++#include "qwindowscontext.h"
++#include "qwindowsintegration.h"
++#include "qwindowswindow.h"
++#include "qwindowskeymapper.h"
++#include "qwindowsmousehandler.h"
++#include "qtwindowsglobal.h"
++#include "qwindowsmenu.h"
++#include "qwindowsmime.h"
++#include "qwindowsinputcontext.h"
++#if QT_CONFIG(tabletevent)
++# include "qwindowstabletsupport.h"
++#endif
++#include "qwindowstheme.h"
++#include <private/qguiapplication_p.h>
++#ifndef QT_NO_ACCESSIBILITY
++# include "uiautomation/qwindowsuiaaccessibility.h"
++#endif
++#if QT_CONFIG(sessionmanager)
++# include <private/qsessionmanager_p.h>
++# include "qwindowssessionmanager.h"
++#endif
++#include "qwindowsscreen.h"
++#include "qwindowstheme.h"
++
++#include <QtGui/qtguiglobal.h>
++#include <QtGui/QWindow>
++#include <qpa/qwindowsysteminterface.h>
++#include <qpa/qplatformnativeinterface.h>
++#include <QtGui/QGuiApplication>
++#include <QtGui/QOpenGLContext>
++
++#include <QtCore/QSet>
++#include <QtCore/QHash>
++#include <QtCore/QStringList>
++#include <QtCore/QDebug>
++#include <QtCore/QOperatingSystemVersion>
++#include <QtCore/QSysInfo>
++#include <QtCore/QScopedArrayPointer>
++#include <QtCore/private/qsystemlibrary_p.h>
++
++#include <QtEventDispatcherSupport/private/qwindowsguieventdispatcher_p.h>
++
++#include <stdlib.h>
++#include <stdio.h>
++#include <windowsx.h>
++#include <comdef.h>
++#include <dbt.h>
++
++QT_BEGIN_NAMESPACE
++
++Q_LOGGING_CATEGORY(lcQpaWindows, "qt.qpa.windows")
++Q_LOGGING_CATEGORY(lcQpaBackingStore, "qt.qpa.backingstore")
++Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events")
++Q_LOGGING_CATEGORY(lcQpaGl, "qt.qpa.gl")
++Q_LOGGING_CATEGORY(lcQpaMime, "qt.qpa.mime")
++Q_LOGGING_CATEGORY(lcQpaInputMethods, "qt.qpa.input.methods")
++Q_LOGGING_CATEGORY(lcQpaDialogs, "qt.qpa.dialogs")
++Q_LOGGING_CATEGORY(lcQpaMenus, "qt.qpa.menus")
++Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
++Q_LOGGING_CATEGORY(lcQpaAccessibility, "qt.qpa.accessibility")
++Q_LOGGING_CATEGORY(lcQpaUiAutomation, "qt.qpa.uiautomation")
++Q_LOGGING_CATEGORY(lcQpaTrayIcon, "qt.qpa.trayicon")
++
++int QWindowsContext::verbose = 0;
++
++#if !defined(LANG_SYRIAC)
++# define LANG_SYRIAC 0x5a
++#endif
++
++static inline bool useRTL_Extensions()
++{
++ // Since the IsValidLanguageGroup/IsValidLocale functions always return true on
++ // Vista, check the Keyboard Layouts for enabling RTL.
++ if (const int nLayouts = GetKeyboardLayoutList(0, 0)) {
++ QScopedArrayPointer<HKL> lpList(new HKL[nLayouts]);
++ GetKeyboardLayoutList(nLayouts, lpList.data());
++ for (int i = 0; i < nLayouts; ++i) {
++ switch (PRIMARYLANGID((quintptr)lpList[i])) {
++ case LANG_ARABIC:
++ case LANG_HEBREW:
++ case LANG_FARSI:
++ case LANG_SYRIAC:
++ return true;
++ default:
++ break;
++ }
++ }
++ }
++ return false;
++}
++
++#if QT_CONFIG(sessionmanager)
++static inline QWindowsSessionManager *platformSessionManager()
++{
++ QGuiApplicationPrivate *guiPrivate = \
static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp)); ++ \
QSessionManagerPrivate *managerPrivate = \
static_cast<QSessionManagerPrivate*>(QObjectPrivate::get(guiPrivate->session_manager));
++ return static_cast<QWindowsSessionManager \
*>(managerPrivate->platformSessionManager); ++}
++
++static inline bool sessionManagerInteractionBlocked()
++{
++ return platformSessionManager()->isInteractionBlocked();
++}
++#else // QT_CONFIG(sessionmanager)
++static inline bool sessionManagerInteractionBlocked() { return false; }
++#endif
++
++static inline int windowDpiAwareness(HWND hwnd)
++{
++ return QWindowsContext::user32dll.getWindowDpiAwarenessContext && \
QWindowsContext::user32dll.getWindowDpiAwarenessContext ++ ? \
QWindowsContext::user32dll.getAwarenessFromDpiAwarenessContext(QWindowsContext::user32dll.getWindowDpiAwarenessContext(hwnd))
++ : -1;
++}
++
++// Note: This only works within WM_NCCREATE
++static bool enableNonClientDpiScaling(HWND hwnd)
++{
++ bool result = false;
++ if (QWindowsContext::user32dll.enableNonClientDpiScaling && \
windowDpiAwareness(hwnd) == 2) { ++ result = \
QWindowsContext::user32dll.enableNonClientDpiScaling(hwnd) != FALSE; ++ if \
(!result) { ++ const DWORD errorCode = GetLastError();
++ qErrnoWarning(int(errorCode), "EnableNonClientDpiScaling() failed for \
HWND %p (%lu)", ++ hwnd, errorCode);
++ }
++ }
++ return result;
++}
++
++/*!
++ \class QWindowsUser32DLL
++ \brief Struct that contains dynamically resolved symbols of User32.dll.
++
++ The stub libraries shipped with the MinGW compiler miss some of the
++ functions. They need to be retrieved dynamically.
++
++ In addition, touch-related functions are available only from Windows onwards.
++ These need to resolved dynamically for Q_CC_MSVC as well.
++
++ \sa QWindowsShell32DLL
++
++ \internal
++ \ingroup qt-lighthouse-win
++*/
++
++void QWindowsUser32DLL::init()
++{
++ QSystemLibrary library(QStringLiteral("user32"));
++ setProcessDPIAware = (SetProcessDPIAware)library.resolve("SetProcessDPIAware");
++
++ addClipboardFormatListener = \
(AddClipboardFormatListener)library.resolve("AddClipboardFormatListener"); ++ \
removeClipboardFormatListener = \
(RemoveClipboardFormatListener)library.resolve("RemoveClipboardFormatListener"); ++
++ getDisplayAutoRotationPreferences = \
(GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences");
++ setDisplayAutoRotationPreferences = \
(SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences");
++
++ if (QOperatingSystemVersion::current()
++ >= QOperatingSystemVersion(QOperatingSystemVersion::Windows, 10, 0, 14393)) \
{ ++ enableNonClientDpiScaling = \
(EnableNonClientDpiScaling)library.resolve("EnableNonClientDpiScaling"); ++ \
getWindowDpiAwarenessContext = \
(GetWindowDpiAwarenessContext)library.resolve("GetWindowDpiAwarenessContext"); ++ \
getAwarenessFromDpiAwarenessContext = \
(GetAwarenessFromDpiAwarenessContext)library.resolve("GetAwarenessFromDpiAwarenessContext");
++ }
++}
++
++void QWindowsShcoreDLL::init()
++{
++ if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8_1)
++ return;
++ QSystemLibrary library(QStringLiteral("SHCore"));
++ getProcessDpiAwareness = \
(GetProcessDpiAwareness)library.resolve("GetProcessDpiAwareness"); ++ \
setProcessDpiAwareness = \
(SetProcessDpiAwareness)library.resolve("SetProcessDpiAwareness"); ++ \
getDpiForMonitor = (GetDpiForMonitor)library.resolve("GetDpiForMonitor"); ++}
++
++QWindowsUser32DLL QWindowsContext::user32dll;
++QWindowsShcoreDLL QWindowsContext::shcoredll;
++
++QWindowsContext *QWindowsContext::m_instance = 0;
++
++/*!
++ \class QWindowsContext
++ \brief Singleton container for all relevant information.
++
++ Holds state information formerly stored in \c qapplication_win.cpp.
++
++ \internal
++ \ingroup qt-lighthouse-win
++*/
++
++typedef QHash<HWND, QWindowsWindow *> HandleBaseWindowHash;
++
++struct QWindowsContextPrivate {
++ QWindowsContextPrivate();
++
++ unsigned m_systemInfo = 0;
++ QSet<QString> m_registeredWindowClassNames;
++ HandleBaseWindowHash m_windows;
++ HDC m_displayContext = 0;
++ int m_defaultDPI = 96;
++ QWindowsKeyMapper m_keyMapper;
++ QWindowsMouseHandler m_mouseHandler;
++ QWindowsMimeConverter m_mimeConverter;
++ QWindowsScreenManager m_screenManager;
++ QSharedPointer<QWindowCreationContext> m_creationContext;
++#if QT_CONFIG(tabletevent)
++ QScopedPointer<QWindowsTabletSupport> m_tabletSupport;
++#endif
++ const HRESULT m_oleInitializeResult;
++ QWindow *m_lastActiveWindow = nullptr;
++ bool m_asyncExpose = false;
++};
++
++QWindowsContextPrivate::QWindowsContextPrivate()
++ : m_oleInitializeResult(OleInitialize(NULL))
++{
++ QWindowsContext::user32dll.init();
++ QWindowsContext::shcoredll.init();
++
++ if (m_mouseHandler.touchDevice())
++ m_systemInfo |= QWindowsContext::SI_SupportsTouch;
++ m_displayContext = GetDC(0);
++ m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
++ if (useRTL_Extensions()) {
++ m_systemInfo |= QWindowsContext::SI_RTL_Extensions;
++ m_keyMapper.setUseRTLExtensions(true);
++ }
++ if (FAILED(m_oleInitializeResult)) {
++ qWarning() << "QWindowsContext: OleInitialize() failed: "
++ << QWindowsContext::comErrorString(m_oleInitializeResult);
++ }
++}
++
++QWindowsContext::QWindowsContext() :
++ d(new QWindowsContextPrivate)
++{
++#ifdef Q_CC_MSVC
++# pragma warning( disable : 4996 )
++#endif
++ m_instance = this;
++ // ### FIXME: Remove this once the logging system has other options of \
configurations. ++ 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
++}
++
++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();
++
++ d->m_screenManager.clearScreens(); // Order: Potentially calls back to the \
windows. ++ m_instance = 0;
++}
++
++bool QWindowsContext::initTouch()
++{
++ return initTouch(QWindowsIntegration::instance()->options());
++}
++
++bool QWindowsContext::initTouch(unsigned integrationOptions)
++{
++ if (d->m_systemInfo & QWindowsContext::SI_SupportsTouch)
++ return true;
++
++ QTouchDevice *touchDevice = d->m_mouseHandler.ensureTouchDevice();
++ if (!touchDevice)
++ return false;
++
++ if (!(integrationOptions & \
QWindowsIntegration::DontPassOsMouseEventsSynthesizedFromTouch)) ++ \
touchDevice->setCapabilities(touchDevice->capabilities() | \
QTouchDevice::MouseEmulation); ++
++ QWindowSystemInterface::registerTouchDevice(touchDevice);
++
++ d->m_systemInfo |= QWindowsContext::SI_SupportsTouch;
++
++ // A touch device was plugged while the app is running. Register all windows \
for touch. ++ if (QGuiApplicationPrivate::is_app_running) {
++ for (QWindowsWindow *w : qAsConst(d->m_windows))
++ w->registerTouchWindow();
++ }
++
++ return true;
++}
++
++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()
++{
++ int result;
++ if (QWindowsContext::shcoredll.getProcessDpiAwareness
++ && SUCCEEDED(QWindowsContext::shcoredll.getProcessDpiAwareness(NULL, \
&result))) { ++ return result;
++ }
++ return -1;
++}
++
++void QWindowsContext::setProcessDpiAwareness(QtWindows::ProcessDpiAwareness \
dpiAwareness) ++{
++ qCDebug(lcQpaWindows) << __FUNCTION__ << dpiAwareness;
++ if (QWindowsContext::shcoredll.isValid()) {
++ const HRESULT hr = \
QWindowsContext::shcoredll.setProcessDpiAwareness(dpiAwareness); ++ // \
E_ACCESSDENIED means set externally (MSVC manifest or external app loading Qt \
plugin). ++ // Silence warning in that case unless debug is enabled.
++ if (FAILED(hr) && (hr != E_ACCESSDENIED || \
lcQpaWindows().isDebugEnabled())) { ++ qWarning().noquote().nospace() << \
"SetProcessDpiAwareness(" ++ << dpiAwareness << ") failed: " << \
QWindowsContext::comErrorString(hr) ++ << ", using " << \
QWindowsContext::processDpiAwareness(); ++ }
++ } else {
++ if (dpiAwareness != QtWindows::ProcessDpiUnaware && \
QWindowsContext::user32dll.setProcessDPIAware) { ++ if \
(!QWindowsContext::user32dll.setProcessDPIAware()) ++ \
qErrnoWarning("SetProcessDPIAware() failed"); ++ }
++ }
++}
++
++QWindowsContext *QWindowsContext::instance()
++{
++ return m_instance;
++}
++
++unsigned QWindowsContext::systemInfo() const
++{
++ return d->m_systemInfo;
++}
++
++bool QWindowsContext::useRTLExtensions() const
++{
++ return d->m_keyMapper.useRTLExtensions();
++}
++
++QList<int> QWindowsContext::possibleKeys(const QKeyEvent *e) const
++{
++ return d->m_keyMapper.possibleKeys(e);
++}
++
++QSharedPointer<QWindowCreationContext> \
QWindowsContext::setWindowCreationContext(const \
QSharedPointer<QWindowCreationContext> &ctx) ++{
++ const QSharedPointer<QWindowCreationContext> old = d->m_creationContext;
++ d->m_creationContext = ctx;
++ return old;
++}
++
++QSharedPointer<QWindowCreationContext> QWindowsContext::windowCreationContext() \
const ++{
++ return d->m_creationContext;
++}
++
++int QWindowsContext::defaultDPI() const
++{
++ return d->m_defaultDPI;
++}
++
++HDC QWindowsContext::displayContext() const
++{
++ return d->m_displayContext;
++}
++
++QWindow *QWindowsContext::keyGrabber() const
++{
++ return d->m_keyMapper.keyGrabber();
++}
++
++void QWindowsContext::setKeyGrabber(QWindow *w)
++{
++ d->m_keyMapper.setKeyGrabber(w);
++}
++
++// Window class registering code (from qapplication_win.cpp)
++
++QString QWindowsContext::registerWindowClass(const QWindow *w)
++{
++ Q_ASSERT(w);
++ const Qt::WindowFlags flags = w->flags();
++ const Qt::WindowFlags type = flags & Qt::WindowType_Mask;
++ // Determine style and icon.
++ uint style = CS_DBLCLKS;
++ bool icon = true;
++ // The following will not set CS_OWNDC for any widget window, even if it \
contains a ++ // QOpenGLWidget or QQuickWidget later on. That cannot be detected \
at this stage. ++ if (w->surfaceType() == QSurface::OpenGLSurface || (flags & \
Qt::MSWindowsOwnDC)) ++ style |= CS_OWNDC;
++ if (!(flags & Qt::NoDropShadowWindowHint)
++ && (type == Qt::Popup || w->property("_q_windowsDropShadow").toBool())) {
++ style |= CS_DROPSHADOW;
++ }
++ switch (type) {
++ case Qt::Tool:
++ case Qt::ToolTip:
++ case Qt::Popup:
++ style |= CS_SAVEBITS; // Save/restore background
++ icon = false;
++ break;
++ case Qt::Dialog:
++ if (!(flags & Qt::WindowSystemMenuHint))
++ icon = false; // QTBUG-2027, dialogs without system menu.
++ break;
++ }
++ // Create a unique name for the flag combination
++ QString cname;
++ cname += QLatin1String("Qt5QWindow");
++ switch (type) {
++ case Qt::Tool:
++ cname += QLatin1String("Tool");
++ break;
++ case Qt::ToolTip:
++ cname += QLatin1String("ToolTip");
++ break;
++ case Qt::Popup:
++ cname += QLatin1String("Popup");
++ break;
++ default:
++ break;
++ }
++ if (style & CS_DROPSHADOW)
++ cname += QLatin1String("DropShadow");
++ if (style & CS_SAVEBITS)
++ cname += QLatin1String("SaveBits");
++ if (style & CS_OWNDC)
++ cname += QLatin1String("OwnDC");
++ if (icon)
++ cname += QLatin1String("Icon");
++
++ return registerWindowClass(cname, qWindowsWndProc, style, \
GetSysColorBrush(COLOR_WINDOW), icon); ++}
++
++QString QWindowsContext::registerWindowClass(QString cname,
++ WNDPROC proc,
++ unsigned style,
++ HBRUSH brush,
++ bool icon)
++{
++ // since multiple Qt versions can be used in one process
++ // each one has to have window class names with a unique name
++ // The first instance gets the unmodified name; if the class
++ // has already been registered by another instance of Qt then
++ // add an instance-specific ID, the address of the window proc.
++ static int classExists = -1;
++
++ const HINSTANCE appInstance = static_cast<HINSTANCE>(GetModuleHandle(0));
++ if (classExists == -1) {
++ WNDCLASS wcinfo;
++ classExists = GetClassInfo(appInstance, \
reinterpret_cast<LPCWSTR>(cname.utf16()), &wcinfo); ++ classExists = \
classExists && wcinfo.lpfnWndProc != proc; ++ }
++
++ if (classExists)
++ cname += QString::number(reinterpret_cast<quintptr>(proc));
++
++ if (d->m_registeredWindowClassNames.contains(cname)) // already \
registered in our list ++ return cname;
++
++ WNDCLASSEX wc;
++ wc.cbSize = sizeof(WNDCLASSEX);
++ wc.style = style;
++ wc.lpfnWndProc = proc;
++ wc.cbClsExtra = 0;
++ wc.cbWndExtra = 0;
++ wc.hInstance = appInstance;
++ wc.hCursor = 0;
++ wc.hbrBackground = brush;
++ if (icon) {
++ wc.hIcon = static_cast<HICON>(LoadImage(appInstance, L"IDI_ICON1", \
IMAGE_ICON, 0, 0, LR_DEFAULTSIZE)); ++ if (wc.hIcon) {
++ int sw = GetSystemMetrics(SM_CXSMICON);
++ int sh = GetSystemMetrics(SM_CYSMICON);
++ wc.hIconSm = static_cast<HICON>(LoadImage(appInstance, L"IDI_ICON1", \
IMAGE_ICON, sw, sh, 0)); ++ } else {
++ wc.hIcon = static_cast<HICON>(LoadImage(0, IDI_APPLICATION, IMAGE_ICON, \
0, 0, LR_DEFAULTSIZE | LR_SHARED)); ++ wc.hIconSm = 0;
++ }
++ } else {
++ wc.hIcon = 0;
++ wc.hIconSm = 0;
++ }
++
++ wc.lpszMenuName = 0;
++ wc.lpszClassName = reinterpret_cast<LPCWSTR>(cname.utf16());
++ ATOM atom = RegisterClassEx(&wc);
++ if (!atom)
++ qErrnoWarning("QApplication::regClass: Registering window class '%s' \
failed.", ++ qPrintable(cname));
++
++ d->m_registeredWindowClassNames.insert(cname);
++ qCDebug(lcQpaWindows).nospace() << __FUNCTION__ << ' ' << cname
++ << " style=0x" << hex << style << dec
++ << " brush=" << brush << " icon=" << icon << " atom=" << atom;
++ return cname;
++}
++
++void QWindowsContext::unregisterWindowClasses()
++{
++ const HINSTANCE appInstance = static_cast<HINSTANCE>(GetModuleHandle(0));
++
++ foreach (const QString &name, d->m_registeredWindowClassNames) {
++ if (!UnregisterClass(reinterpret_cast<LPCWSTR>(name.utf16()), appInstance) \
&& QWindowsContext::verbose) ++ qErrnoWarning("UnregisterClass failed for \
'%s'", qPrintable(name)); ++ }
++ d->m_registeredWindowClassNames.clear();
++}
++
++int QWindowsContext::screenDepth() const
++{
++ return GetDeviceCaps(d->m_displayContext, BITSPIXEL);
++}
++
++QString QWindowsContext::windowsErrorMessage(unsigned long errorCode)
++{
++ QString rc = QString::fromLatin1("#%1: ").arg(errorCode);
++ ushort *lpMsgBuf;
++
++ const DWORD len = FormatMessage(
++ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | \
FORMAT_MESSAGE_IGNORE_INSERTS, ++ NULL, errorCode, 0, \
reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, NULL); ++ if (len) {
++ rc = QString::fromUtf16(lpMsgBuf, int(len));
++ LocalFree(lpMsgBuf);
++ } else {
++ rc += QString::fromLatin1("<unknown error>");
++ }
++ return rc;
++}
++
++void QWindowsContext::addWindow(HWND hwnd, QWindowsWindow *w)
++{
++ d->m_windows.insert(hwnd, w);
++}
++
++void QWindowsContext::removeWindow(HWND hwnd)
++{
++ const HandleBaseWindowHash::iterator it = d->m_windows.find(hwnd);
++ if (it != d->m_windows.end()) {
++ if (d->m_keyMapper.keyGrabber() == it.value()->window())
++ d->m_keyMapper.setKeyGrabber(0);
++ d->m_windows.erase(it);
++ }
++}
++
++QWindowsWindow *QWindowsContext::findPlatformWindow(const QWindowsMenuBar *mb) \
const ++{
++ for (auto it = d->m_windows.cbegin(), end = d->m_windows.cend(); it != end; \
++it) { ++ if ((*it)->menuBar() == mb)
++ return *it;
++ }
++ return nullptr;
++}
++
++QWindowsWindow *QWindowsContext::findPlatformWindow(HWND hwnd) const
++{
++ return d->m_windows.value(hwnd);
++}
++
++QWindowsWindow *QWindowsContext::findClosestPlatformWindow(HWND hwnd) const
++{
++ QWindowsWindow *window = d->m_windows.value(hwnd);
++
++ // Requested hwnd may also be a child of a platform window in case of embedded \
native windows. ++ // Find the closest parent that has a platform window.
++ if (!window) {
++ for (HWND w = hwnd; w; w = GetParent(w)) {
++ window = d->m_windows.value(w);
++ if (window)
++ break;
++ }
++ }
++
++ return window;
++}
++
++QWindow *QWindowsContext::findWindow(HWND hwnd) const
++{
++ if (const QWindowsWindow *bw = findPlatformWindow(hwnd))
++ return bw->window();
++ return 0;
++}
++
++QWindow *QWindowsContext::windowUnderMouse() const
++{
++ return d->m_mouseHandler.windowUnderMouse();
++}
++
++void QWindowsContext::clearWindowUnderMouse()
++{
++ d->m_mouseHandler.clearWindowUnderMouse();
++}
++
++/*!
++ \brief Find a child window at a screen point.
++
++ Deep search for a QWindow at global point, skipping non-owned
++ windows (accessibility?). Implemented using ChildWindowFromPointEx()
++ instead of (historically used) WindowFromPoint() to get a well-defined
++ behaviour for hidden/transparent windows.
++
++ \a cwex_flags are flags of ChildWindowFromPointEx().
++ \a parent is the parent window, pass GetDesktopWindow() for top levels.
++*/
++
++static inline bool findPlatformWindowHelper(const POINT &screenPoint, unsigned \
cwexFlags, ++ const QWindowsContext \
*context, ++ HWND *hwnd, QWindowsWindow \
**result) ++{
++ POINT point = screenPoint;
++ ScreenToClient(*hwnd, &point);
++ // Returns parent if inside & none matched.
++ const HWND child = ChildWindowFromPointEx(*hwnd, point, cwexFlags);
++ if (!child || child == *hwnd)
++ return false;
++ if (QWindowsWindow *window = context->findPlatformWindow(child)) {
++ *result = window;
++ *hwnd = child;
++ return true;
++ }
++ // QTBUG-40555: despite CWP_SKIPINVISIBLE, it is possible to hit on invisible
++ // full screen windows of other applications that have WS_EX_TRANSPARENT set
++ // (for example created by screen sharing applications). In that case, try to
++ // find a Qt window by searching again with CWP_SKIPTRANSPARENT.
++ // Note that Qt 5 uses WS_EX_TRANSPARENT for Qt::WindowTransparentForInput
++ // as well.
++ if (!(cwexFlags & CWP_SKIPTRANSPARENT)
++ && (GetWindowLongPtr(child, GWL_EXSTYLE) & WS_EX_TRANSPARENT)) {
++ const HWND nonTransparentChild = ChildWindowFromPointEx(*hwnd, point, \
cwexFlags | CWP_SKIPTRANSPARENT); ++ if (QWindowsWindow *nonTransparentWindow \
= context->findPlatformWindow(nonTransparentChild)) { ++ *result = \
nonTransparentWindow; ++ *hwnd = nonTransparentChild;
++ return true;
++ }
++ }
++ *hwnd = child;
++ return true;
++}
++
++QWindowsWindow *QWindowsContext::findPlatformWindowAt(HWND parent,
++ const QPoint \
&screenPointIn, ++ unsigned \
cwex_flags) const ++{
++ QWindowsWindow *result = 0;
++ const POINT screenPoint = { screenPointIn.x(), screenPointIn.y() };
++ while (findPlatformWindowHelper(screenPoint, cwex_flags, this, &parent, \
&result)) {} ++ return result;
++}
++
++QWindowsMimeConverter &QWindowsContext::mimeConverter() const
++{
++ return d->m_mimeConverter;
++}
++
++QWindowsScreenManager &QWindowsContext::screenManager()
++{
++ return d->m_screenManager;
++}
++
++QWindowsTabletSupport *QWindowsContext::tabletSupport() const
++{
++#if QT_CONFIG(tabletevent)
++ return d->m_tabletSupport.data();
++#else
++ return 0;
++#endif
++}
++
++/*!
++ \brief Convenience to create a non-visible, message-only dummy
++ window for example used as clipboard watcher or for GL.
++*/
++
++HWND QWindowsContext::createDummyWindow(const QString &classNameIn,
++ const wchar_t *windowName,
++ WNDPROC wndProc, DWORD style)
++{
++ if (!wndProc)
++ wndProc = DefWindowProc;
++ QString className = registerWindowClass(classNameIn, wndProc);
++ return CreateWindowEx(0, reinterpret_cast<LPCWSTR>(className.utf16()),
++ windowName, style,
++ CW_USEDEFAULT, CW_USEDEFAULT,
++ CW_USEDEFAULT, CW_USEDEFAULT,
++ HWND_MESSAGE, NULL, \
static_cast<HINSTANCE>(GetModuleHandle(0)), NULL); ++}
++
++// Re-engineered from the inline function _com_error::ErrorMessage().
++// We cannot use it directly since it uses swprintf_s(), which is not
++// present in the MSVCRT.DLL found on Windows XP (QTBUG-35617).
++static inline QString errorMessageFromComError(const _com_error &comError)
++{
++ TCHAR *message = nullptr;
++ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
++ NULL, DWORD(comError.Error()), \
MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), ++ message, 0, NULL);
++ if (message) {
++ const QString result = QString::fromWCharArray(message).trimmed();
++ LocalFree(static_cast<HLOCAL>(message));
++ return result;
++ }
++ if (const WORD wCode = comError.WCode())
++ return QString::asprintf("IDispatch error #%u", uint(wCode));
++ return QString::asprintf("Unknown error 0x0%x", uint(comError.Error()));
++}
++
++/*!
++ \brief Common COM error strings.
++*/
++
++QByteArray QWindowsContext::comErrorString(HRESULT hr)
++{
++ QByteArray result = QByteArrayLiteral("COM error 0x")
++ + QByteArray::number(quintptr(hr), 16) + ' ';
++ switch (hr) {
++ case S_OK:
++ result += QByteArrayLiteral("S_OK");
++ break;
++ case S_FALSE:
++ result += QByteArrayLiteral("S_FALSE");
++ break;
++ case E_UNEXPECTED:
++ result += QByteArrayLiteral("E_UNEXPECTED");
++ break;
++ case E_ACCESSDENIED:
++ result += QByteArrayLiteral("E_ACCESSDENIED");
++ break;
++ case CO_E_ALREADYINITIALIZED:
++ result += QByteArrayLiteral("CO_E_ALREADYINITIALIZED");
++ break;
++ case CO_E_NOTINITIALIZED:
++ result += QByteArrayLiteral("CO_E_NOTINITIALIZED");
++ break;
++ case RPC_E_CHANGED_MODE:
++ result += QByteArrayLiteral("RPC_E_CHANGED_MODE");
++ break;
++ case OLE_E_WRONGCOMPOBJ:
++ result += QByteArrayLiteral("OLE_E_WRONGCOMPOBJ");
++ break;
++ case CO_E_NOT_SUPPORTED:
++ result += QByteArrayLiteral("CO_E_NOT_SUPPORTED");
++ break;
++ case E_NOTIMPL:
++ result += QByteArrayLiteral("E_NOTIMPL");
++ break;
++ case E_INVALIDARG:
++ result += QByteArrayLiteral("E_INVALIDARG");
++ break;
++ case E_NOINTERFACE:
++ result += QByteArrayLiteral("E_NOINTERFACE");
++ break;
++ case E_POINTER:
++ result += QByteArrayLiteral("E_POINTER");
++ break;
++ case E_HANDLE:
++ result += QByteArrayLiteral("E_HANDLE");
++ break;
++ case E_ABORT:
++ result += QByteArrayLiteral("E_ABORT");
++ break;
++ case E_FAIL:
++ result += QByteArrayLiteral("E_FAIL");
++ break;
++ case RPC_E_WRONG_THREAD:
++ result += QByteArrayLiteral("RPC_E_WRONG_THREAD");
++ break;
++ case RPC_E_THREAD_NOT_INIT:
++ result += QByteArrayLiteral("RPC_E_THREAD_NOT_INIT");
++ break;
++ default:
++ break;
++ }
++ _com_error error(hr);
++ result += QByteArrayLiteral(" (");
++ result += errorMessageFromComError(error);
++ result += ')';
++ return result;
++}
++
++static inline QWindowsInputContext *windowsInputContext()
++{
++ return qobject_cast<QWindowsInputContext \
*>(QWindowsIntegration::instance()->inputContext()); ++}
++
++
++// Child windows, fixed-size windows or pop-ups and similar should not be resized
++static inline bool resizeOnDpiChanged(const QWindow *w)
++{
++ bool result = false;
++ if (w->isTopLevel()) {
++ switch (w->type()) {
++ case Qt::Window:
++ case Qt::Dialog:
++ case Qt::Sheet:
++ case Qt::Drawer:
++ case Qt::Tool:
++ result = !w->flags().testFlag(Qt::MSWindowsFixedSizeDialogHint);
++ break;
++ default:
++ break;
++ }
++ }
++ return result;
++}
++
++static bool shouldHaveNonClientDpiScaling(const QWindow *window)
++{
++ return QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows10
++ && window->isTopLevel()
++ && !window->property(QWindowsWindow::embeddedNativeParentHandleProperty).isValid()
++#if QT_CONFIG(opengl) // /QTBUG-62901, EnableNonClientDpiScaling has problems with \
GL ++ && (window->surfaceType() != QSurface::OpenGLSurface
++ || QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL)
++#endif
++ ;
++}
++
++static inline bool isInputMessage(UINT m)
++{
++ switch (m) {
++ case WM_IME_STARTCOMPOSITION:
++ case WM_IME_ENDCOMPOSITION:
++ case WM_IME_COMPOSITION:
++ case WM_TOUCH:
++ case WM_MOUSEHOVER:
++ case WM_MOUSELEAVE:
++ case WM_NCHITTEST:
++ case WM_NCMOUSEHOVER:
++ case WM_NCMOUSELEAVE:
++ case WM_SIZING:
++ case WM_MOVING:
++ case WM_SYSCOMMAND:
++ case WM_COMMAND:
++ case WM_DWMNCRENDERINGCHANGED:
++ case WM_PAINT:
++ return true;
++ default:
++ break;
++ }
++ return (m >= WM_MOUSEFIRST && m <= WM_MOUSELAST)
++ || (m >= WM_NCMOUSEMOVE && m <= WM_NCXBUTTONDBLCLK)
++ || (m >= WM_KEYFIRST && m <= WM_KEYLAST);
++}
++
++/*!
++ \brief Main windows procedure registered for windows.
++
++ \sa QWindowsGuiEventDispatcher
++*/
++
++bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
++ QtWindows::WindowsEventType et,
++ WPARAM wParam, LPARAM lParam,
++ LRESULT *result,
++ QWindowsWindow **platformWindowPtr)
++{
++ *result = 0;
++
++ MSG msg;
++ msg.hwnd = hwnd; // re-create MSG structure
++ msg.message = message; // time and pt fields ignored
++ msg.wParam = wParam;
++ msg.lParam = lParam;
++ msg.pt.x = msg.pt.y = 0;
++ if (et != QtWindows::CursorEvent && (et & (QtWindows::MouseEventFlag | \
QtWindows::NonClientEventFlag))) { ++ msg.pt.x = GET_X_LPARAM(lParam);
++ msg.pt.y = GET_Y_LPARAM(lParam);
++ // For non-client-area messages, these are screen coordinates (as expected
++ // in the MSG structure), otherwise they are client coordinates.
++ if (!(et & QtWindows::NonClientEventFlag)) {
++ ClientToScreen(msg.hwnd, &msg.pt);
++ }
++ } else {
++ GetCursorPos(&msg.pt);
++ }
++
++ QWindowsWindow *platformWindow = findPlatformWindow(hwnd);
++ *platformWindowPtr = platformWindow;
++
++ // Run the native event filters. QTBUG-67095: Exclude input messages which are \
sent ++ // by QEventDispatcherWin32::processEvents()
++ if (!isInputMessage(msg.message) && filterNativeEvent(&msg, result))
++ return true;
++
++ if (platformWindow && filterNativeEvent(platformWindow->window(), &msg, \
result)) ++ return true;
++
++ if (et & QtWindows::InputMethodEventFlag) {
++ QWindowsInputContext *windowsInputContext = ::windowsInputContext();
++ // Disable IME assuming this is a special implementation hooking into \
keyboard input. ++ // "Real" IME implementations should use a native event \
filter intercepting IME events. ++ if (!windowsInputContext) {
++ QWindowsInputContext::setWindowsImeEnabled(platformWindow, false);
++ return false;
++ }
++ switch (et) {
++ case QtWindows::InputMethodStartCompositionEvent:
++ return windowsInputContext->startComposition(hwnd);
++ case QtWindows::InputMethodCompositionEvent:
++ return windowsInputContext->composition(hwnd, lParam);
++ case QtWindows::InputMethodEndCompositionEvent:
++ return windowsInputContext->endComposition(hwnd);
++ case QtWindows::InputMethodRequest:
++ return windowsInputContext->handleIME_Request(wParam, lParam, result);
++ default:
++ break;
++ }
++ } // InputMethodEventFlag
++
++ switch (et) {
++ case QtWindows::GestureEvent:
++ return sessionManagerInteractionBlocked() || \
d->m_mouseHandler.translateGestureEvent(platformWindow->window(), hwnd, et, msg, \
result); ++ case QtWindows::InputMethodOpenCandidateWindowEvent:
++ case QtWindows::InputMethodCloseCandidateWindowEvent:
++ // TODO: Release/regrab mouse if a popup has mouse grab.
++ return false;
++ case QtWindows::DestroyEvent:
++ if (platformWindow && \
!platformWindow->testFlag(QWindowsWindow::WithinDestroy)) { ++ qWarning() \
<< "External WM_DESTROY received for " << platformWindow->window() ++ \
<< ", parent: " << platformWindow->window()->parent() ++ << ", \
transient parent: " << platformWindow->window()->transientParent(); ++ }
++ return false;
++ case QtWindows::ClipboardEvent:
++ return false;
++ case QtWindows::UnknownEvent:
++ return false;
++ case QtWindows::AccessibleObjectFromWindowRequest:
++#ifndef QT_NO_ACCESSIBILITY
++ return QWindowsUiaAccessibility::handleWmGetObject(hwnd, wParam, lParam, \
result); ++#else
++ return false;
++#endif
++ case QtWindows::DisplayChangedEvent:
++ if (QWindowsTheme *t = QWindowsTheme::instance())
++ t->displayChanged();
++ return d->m_screenManager.handleDisplayChange(wParam, lParam);
++ case QtWindows::SettingChangedEvent:
++ return d->m_screenManager.handleScreenChanges();
++ default:
++ break;
++ }
++
++ // Before CreateWindowEx() returns, some events are sent,
++ // for example WM_GETMINMAXINFO asking for size constraints for top levels.
++ // Pass on to current creation context
++ if (!platformWindow && !d->m_creationContext.isNull()) {
++ switch (et) {
++ case QtWindows::QuerySizeHints:
++ d->m_creationContext->applyToMinMaxInfo(reinterpret_cast<MINMAXINFO \
*>(lParam)); ++ return true;
++ case QtWindows::ResizeEvent: {
++ const QSize size(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) - \
d->m_creationContext->menuHeight); ++ \
d->m_creationContext->obtainedGeometry.setSize(size); ++ }
++ return true;
++ case QtWindows::MoveEvent:
++ d->m_creationContext->obtainedGeometry.moveTo(GET_X_LPARAM(lParam), \
GET_Y_LPARAM(lParam)); ++ return true;
++ case QtWindows::NonClientCreate:
++ if (shouldHaveNonClientDpiScaling(d->m_creationContext->window))
++ enableNonClientDpiScaling(msg.hwnd);
++ return false;
++ case QtWindows::CalculateSize:
++ return \
QWindowsGeometryHint::handleCalculateSize(d->m_creationContext->customMargins, msg, \
result); ++ case QtWindows::GeometryChangingEvent:
++ return QWindowsWindow::handleGeometryChangingMessage(&msg, \
d->m_creationContext->window, ++ \
d->m_creationContext->margins + d->m_creationContext->customMargins); ++ \
default: ++ break;
++ }
++ }
++ if (platformWindow) {
++ // Suppress events sent during DestroyWindow() for native children.
++ if (platformWindow->testFlag(QWindowsWindow::WithinDestroy))
++ return false;
++ if (QWindowsContext::verbose > 1)
++ qCDebug(lcQpaEvents) << "Event window: " << platformWindow->window();
++ } else {
++ qWarning("%s: No Qt Window found for event 0x%x (%s), hwnd=0x%p.",
++ __FUNCTION__, message,
++ QWindowsGuiEventDispatcher::windowsMessageName(message), hwnd);
++ return false;
++ }
++
++ switch (et) {
++ case QtWindows::DeviceChangeEvent:
++ if (d->m_systemInfo & QWindowsContext::SI_SupportsTouch)
++ break;
++ // See if there are any touch devices added
++ if (wParam == DBT_DEVNODES_CHANGED)
++ initTouch();
++ break;
++ case QtWindows::KeyboardLayoutChangeEvent:
++ if (QWindowsInputContext *wic = windowsInputContext())
++ wic->handleInputLanguageChanged(wParam, lParam);
++ Q_FALLTHROUGH();
++ case QtWindows::KeyDownEvent:
++ case QtWindows::KeyEvent:
++ case QtWindows::InputMethodKeyEvent:
++ case QtWindows::InputMethodKeyDownEvent:
++ case QtWindows::AppCommandEvent:
++ return sessionManagerInteractionBlocked() || \
d->m_keyMapper.translateKeyEvent(platformWindow->window(), hwnd, msg, result); ++ \
case QtWindows::MenuAboutToShowEvent: ++ if \
(sessionManagerInteractionBlocked()) ++ return true;
++ if (QWindowsPopupMenu::notifyAboutToShow(reinterpret_cast<HMENU>(wParam)))
++ return true;
++ if (platformWindow == nullptr || platformWindow->menuBar() == nullptr)
++ return false;
++ return platformWindow->menuBar()->notifyAboutToShow(reinterpret_cast<HMENU>(wParam));
++ case QtWindows::MenuCommandEvent:
++ if (sessionManagerInteractionBlocked())
++ return true;
++ if (QWindowsPopupMenu::notifyTriggered(LOWORD(wParam)))
++ return true;
++ if (platformWindow == nullptr || platformWindow->menuBar() == nullptr)
++ return false;
++ return platformWindow->menuBar()->notifyTriggered(LOWORD(wParam));
++ case QtWindows::MoveEvent:
++ platformWindow->handleMoved();
++ return true;
++ case QtWindows::ResizeEvent:
++ platformWindow->handleResized(static_cast<int>(wParam));
++ return true;
++ case QtWindows::QuerySizeHints:
++ platformWindow->getSizeHints(reinterpret_cast<MINMAXINFO *>(lParam));
++ return true;// maybe available on some SDKs revisit WM_NCCALCSIZE
++ case QtWindows::CalculateSize:
++ return QWindowsGeometryHint::handleCalculateSize(platformWindow->customMargins(), \
msg, result); ++ case QtWindows::NonClientHitTest:
++ return platformWindow->handleNonClientHitTest(QPoint(msg.pt.x, msg.pt.y), \
result); ++ case QtWindows::GeometryChangingEvent:
++ return platformWindow->QWindowsWindow::handleGeometryChanging(&msg);
++ case QtWindows::ExposeEvent:
++ return platformWindow->handleWmPaint(hwnd, message, wParam, lParam);
++ case QtWindows::NonClientMouseEvent:
++ if (platformWindow->frameStrutEventsEnabled())
++ return sessionManagerInteractionBlocked() || \
d->m_mouseHandler.translateMouseEvent(platformWindow->window(), hwnd, et, msg, \
result); ++ break;
++ case QtWindows::EnterSizeMoveEvent:
++ platformWindow->setFlag(QWindowsWindow::ResizeMoveActive);
++ return true;
++ case QtWindows::ExitSizeMoveEvent:
++ platformWindow->clearFlag(QWindowsWindow::ResizeMoveActive);
++ platformWindow->checkForScreenChanged();
++ return true;
++ case QtWindows::ScrollEvent:
++ return sessionManagerInteractionBlocked() || \
d->m_mouseHandler.translateScrollEvent(platformWindow->window(), hwnd, msg, result); \
++ case QtWindows::MouseWheelEvent: ++ case QtWindows::MouseEvent:
++ case QtWindows::LeaveEvent:
++ {
++ QWindow *window = platformWindow->window();
++ while (window && (window->flags() & Qt::WindowTransparentForInput))
++ window = window->parent();
++ if (!window)
++ return false;
++ return sessionManagerInteractionBlocked() || \
d->m_mouseHandler.translateMouseEvent(window, hwnd, et, msg, result); ++ }
++ case QtWindows::TouchEvent:
++ return sessionManagerInteractionBlocked() || \
d->m_mouseHandler.translateTouchEvent(platformWindow->window(), hwnd, et, msg, \
result); ++ case QtWindows::FocusInEvent: // see \
QWindowsWindow::requestActivateWindow(). ++ case QtWindows::FocusOutEvent:
++ handleFocusEvent(et, platformWindow);
++ return true;
++ case QtWindows::ShowEventOnParentRestoring: // QTBUG-40696, prevent Windows \
from re-showing hidden transient children (dialogs). ++ if \
(!platformWindow->window()->isVisible()) { ++ *result = 0;
++ return true;
++ }
++ break;
++ case QtWindows::HideEvent:
++ platformWindow->handleHidden();
++ return false;// Indicate transient children should be hidden by windows \
(SW_PARENTCLOSING) ++ case QtWindows::CloseEvent:
++ QWindowSystemInterface::handleCloseEvent(platformWindow->window());
++ return true;
++ case QtWindows::ThemeChanged: {
++ // Switch from Aero to Classic changes margins.
++ if (QWindowsTheme *theme = QWindowsTheme::instance())
++ theme->windowsThemeChanged(platformWindow->window());
++ return true;
++ }
++ case QtWindows::CompositionSettingsChanged:
++ platformWindow->handleCompositionSettingsChanged();
++ return true;
++ case QtWindows::ActivateWindowEvent:
++ if (platformWindow->window()->flags() & Qt::WindowDoesNotAcceptFocus) {
++ *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); ++ \
Q_ASSERT(platformWindow); ++ platformWindow->alertWindow();
++ }
++ break;
++ case QtWindows::MouseActivateWindowEvent:
++ if (platformWindow->window()->flags() & Qt::WindowDoesNotAcceptFocus) {
++ *result = LRESULT(MA_NOACTIVATE);
++ return true;
++ }
++ break;
++#ifndef QT_NO_CONTEXTMENU
++ case QtWindows::ContextMenu:
++ return handleContextMenuEvent(platformWindow->window(), msg);
++#endif
++ case QtWindows::WhatsThisEvent: {
++#ifndef QT_NO_WHATSTHIS
++ QWindowSystemInterface::handleEnterWhatsThisEvent();
++ return true;
++#endif
++ } break;
++ case QtWindows::DpiChangedEvent: {
++ if (!resizeOnDpiChanged(platformWindow->window()))
++ return false;
++ platformWindow->setFlag(QWindowsWindow::WithinDpiChanged);
++ const RECT *prcNewWindow = reinterpret_cast<RECT *>(lParam);
++ SetWindowPos(hwnd, NULL, prcNewWindow->left, prcNewWindow->top,
++ prcNewWindow->right - prcNewWindow->left,
++ prcNewWindow->bottom - prcNewWindow->top, SWP_NOZORDER | \
SWP_NOACTIVATE); ++ \
platformWindow->clearFlag(QWindowsWindow::WithinDpiChanged); ++ return true;
++ }
++#if QT_CONFIG(sessionmanager)
++ case QtWindows::QueryEndSessionApplicationEvent: {
++ QWindowsSessionManager *sessionManager = platformSessionManager();
++ if (sessionManager->isActive()) { // bogus message from windows
++ *result = sessionManager->wasCanceled() ? 0 : 1;
++ return true;
++ }
++
++ sessionManager->setActive(true);
++ sessionManager->blocksInteraction();
++ sessionManager->clearCancellation();
++
++ QGuiApplicationPrivate *qGuiAppPriv = \
static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp)); ++ \
qGuiAppPriv->commitData(); ++
++ if (lParam & ENDSESSION_LOGOFF)
++ fflush(NULL);
++
++ *result = sessionManager->wasCanceled() ? 0 : 1;
++ return true;
++ }
++ case QtWindows::EndSessionApplicationEvent: {
++ QWindowsSessionManager *sessionManager = platformSessionManager();
++
++ sessionManager->setActive(false);
++ sessionManager->allowsInteraction();
++ const bool endsession = wParam != 0;
++
++ // we receive the message for each toplevel window included internal hidden \
ones, ++ // but the aboutToQuit signal should be emitted only once.
++ QGuiApplicationPrivate *qGuiAppPriv = \
static_cast<QGuiApplicationPrivate*>(QObjectPrivate::get(qApp)); ++ if \
(endsession && !qGuiAppPriv->aboutToQuitEmitted) { ++ \
qGuiAppPriv->aboutToQuitEmitted = true; ++ int index = \
QGuiApplication::staticMetaObject.indexOfSignal("aboutToQuit()"); ++ \
qApp->qt_metacall(QMetaObject::InvokeMetaMethod, index,0); ++ // since the \
process will be killed immediately quit() has no real effect ++ \
QGuiApplication::quit(); ++ }
++ return true;
++ }
++#endif // !defined(QT_NO_SESSIONMANAGER)
++ default:
++ break;
++ }
++ return false;
++}
++
++/* Compress activation events. If the next focus window is already known
++ * at the time the current one receives focus-out, pass that to
++ * QWindowSystemInterface instead of sending 0 and ignore its consecutive
++ * focus-in event.
++ * This helps applications that do handling in focus-out events. */
++void QWindowsContext::handleFocusEvent(QtWindows::WindowsEventType et,
++ QWindowsWindow *platformWindow)
++{
++ QWindow *nextActiveWindow = 0;
++ if (et == QtWindows::FocusInEvent) {
++ QWindow *topWindow = QWindowsWindow::topLevelOf(platformWindow->window());
++ QWindow *modalWindow = 0;
++ if (QGuiApplicationPrivate::instance()->isWindowBlocked(topWindow, \
&modalWindow) && topWindow != modalWindow) { ++ \
modalWindow->requestActivate(); ++ return;
++ }
++ // QTBUG-32867: Invoking WinAPI SetParent() can cause focus-in for the
++ // window which is not desired for native child widgets.
++ if (platformWindow->testFlag(QWindowsWindow::WithinSetParent)) {
++ QWindow *currentFocusWindow = QGuiApplication::focusWindow();
++ if (currentFocusWindow && currentFocusWindow != \
platformWindow->window()) { ++ currentFocusWindow->requestActivate();
++ return;
++ }
++ }
++ nextActiveWindow = platformWindow->window();
++ } else {
++ // Focus out: Is the next window known and different
++ // from the receiving the focus out.
++ if (const HWND nextActiveHwnd = GetFocus())
++ if (QWindowsWindow *nextActivePlatformWindow = \
findClosestPlatformWindow(nextActiveHwnd)) ++ if \
(nextActivePlatformWindow != platformWindow) ++ nextActiveWindow = \
nextActivePlatformWindow->window(); ++ }
++ if (nextActiveWindow != d->m_lastActiveWindow) {
++ d->m_lastActiveWindow = nextActiveWindow;
++ QWindowSystemInterface::handleWindowActivated(nextActiveWindow);
++ }
++}
++
++#ifndef QT_NO_CONTEXTMENU
++bool QWindowsContext::handleContextMenuEvent(QWindow *window, const MSG &msg)
++{
++ bool mouseTriggered = false;
++ QPoint globalPos;
++ QPoint pos;
++ if (msg.lParam != int(0xffffffff)) {
++ mouseTriggered = true;
++ globalPos.setX(msg.pt.x);
++ globalPos.setY(msg.pt.y);
++ pos = QWindowsGeometryHint::mapFromGlobal(msg.hwnd, globalPos);
++
++ RECT clientRect;
++ if (GetClientRect(msg.hwnd, &clientRect)) {
++ if (pos.x() < clientRect.left || pos.x() >= clientRect.right ||
++ pos.y() < clientRect.top || pos.y() >= clientRect.bottom)
++ {
++ // This is the case that user has right clicked in the window's \
caption, ++ // We should call DefWindowProc() to display a default \
shortcut menu ++ // instead of sending a Qt window system event.
++ return false;
++ }
++ }
++ }
++
++ QWindowSystemInterface::handleContextMenuEvent(window, mouseTriggered, pos, \
globalPos, ++ \
QWindowsKeyMapper::queryKeyboardModifiers()); ++ return true;
++}
++#endif
++
++bool QWindowsContext::asyncExpose() const
++{
++ return d->m_asyncExpose;
++}
++
++void QWindowsContext::setAsyncExpose(bool value)
++{
++ d->m_asyncExpose = value;
++}
++
++QTouchDevice *QWindowsContext::touchDevice() const
++{
++ return d->m_mouseHandler.touchDevice();
++}
++
++static DWORD readDwordRegistrySetting(const wchar_t *regKey, const wchar_t *subKey, \
DWORD defaultValue) ++{
++ DWORD result = defaultValue;
++ HKEY handle;
++ if (RegOpenKeyEx(HKEY_CURRENT_USER, regKey, 0, KEY_READ, &handle) == \
ERROR_SUCCESS) { ++ DWORD type;
++ if (RegQueryValueEx(handle, subKey, 0, &type, 0, 0) == ERROR_SUCCESS && \
type == REG_DWORD) { ++ DWORD value;
++ DWORD size = sizeof(result);
++ if (RegQueryValueEx(handle, subKey, 0, 0, reinterpret_cast<unsigned \
char *>(&value), &size) == ERROR_SUCCESS) ++ result = value;
++ }
++ RegCloseKey(handle);
++ }
++ return result;
++}
++
++DWORD QWindowsContext::readAdvancedExplorerSettings(const wchar_t *subKey, DWORD \
defaultValue) ++{
++ return readDwordRegistrySetting(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
++ subKey, defaultValue);
++}
++
++static inline bool isEmptyRect(const RECT &rect)
++{
++ return rect.right - rect.left == 0 && rect.bottom - rect.top == 0;
++}
++
++static inline QMargins marginsFromRects(const RECT &frame, const RECT &client)
++{
++ return QMargins(client.left - frame.left, client.top - frame.top,
++ frame.right - client.right, frame.bottom - client.bottom);
++}
++
++static RECT rectFromNcCalcSize(UINT message, WPARAM wParam, LPARAM lParam, int n)
++{
++ RECT result = {0, 0, 0, 0};
++ if (message == WM_NCCALCSIZE && wParam)
++ result = reinterpret_cast<const NCCALCSIZE_PARAMS *>(lParam)->rgrc[n];
++ return result;
++}
++
++static inline bool isMinimized(HWND hwnd)
++{
++ WINDOWPLACEMENT windowPlacement;
++ windowPlacement.length = sizeof(WINDOWPLACEMENT);
++ return GetWindowPlacement(hwnd, &windowPlacement) && windowPlacement.showCmd == \
SW_SHOWMINIMIZED; ++}
++
++static inline bool isTopLevel(HWND hwnd)
++{
++ return (GetWindowLongPtr(hwnd, GWL_STYLE) & WS_CHILD) == 0;
++}
++
++/*!
++ \brief Windows functions for actual windows.
++
++ There is another one for timers, sockets, etc in
++ QEventDispatcherWin32.
++
++ \ingroup qt-lighthouse-win
++*/
++
++extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPARAM \
wParam, LPARAM lParam) ++{
++ LRESULT result;
++ const QtWindows::WindowsEventType et = windowsEventType(message, wParam, \
lParam); ++ QWindowsWindow *platformWindow = nullptr;
++ const RECT ncCalcSizeFrame = rectFromNcCalcSize(message, wParam, lParam, 0);
++ const bool handled = QWindowsContext::instance()->windowsProc(hwnd, message, \
et, wParam, lParam, &result, &platformWindow); ++ if (QWindowsContext::verbose > 1 \
&& lcQpaEvents().isDebugEnabled()) { ++ if (const char *eventName = \
QWindowsGuiEventDispatcher::windowsMessageName(message)) { ++ \
qCDebug(lcQpaEvents).nospace() << "EVENT: hwd=" << hwnd << ' ' << eventName ++ \
<< " msg=0x" << hex << message << " et=0x" << et << dec << " wp=" ++ \
<< int(wParam) << " at " << GET_X_LPARAM(lParam) << ',' ++ << \
GET_Y_LPARAM(lParam) << " handled=" << handled; ++ }
++ }
++ if (!handled)
++ result = DefWindowProc(hwnd, message, wParam, lParam);
++
++ // Capture WM_NCCALCSIZE on top level windows and obtain the window margins by
++ // subtracting the rectangles before and after processing. This will correctly
++ // capture client code overriding the message and allow for per-monitor margins
++ // for High DPI (QTBUG-53255, QTBUG-40578).
++ if (message == WM_NCCALCSIZE && !isEmptyRect(ncCalcSizeFrame) && \
isTopLevel(hwnd) && !isMinimized(hwnd)) { ++ const QMargins margins =
++ marginsFromRects(ncCalcSizeFrame, rectFromNcCalcSize(message, wParam, \
lParam, 0)); ++ if (margins.left() >= 0) {
++ if (platformWindow) {
++ platformWindow->setFrameMargins(margins);
++ } else {
++ const QSharedPointer<QWindowCreationContext> ctx = \
QWindowsContext::instance()->windowCreationContext(); ++ if \
(!ctx.isNull()) ++ ctx->margins = margins;
++ }
++ }
++ }
++ return result;
++}
++
++
++static inline QByteArray nativeEventType() { return \
QByteArrayLiteral("windows_generic_MSG"); } ++
++// Send to QAbstractEventDispatcher
++bool QWindowsContext::filterNativeEvent(MSG *msg, LRESULT *result)
++{
++ QAbstractEventDispatcher *dispatcher = QAbstractEventDispatcher::instance();
++ long filterResult = 0;
++ if (dispatcher && dispatcher->filterNativeEvent(nativeEventType(), msg, \
&filterResult)) { ++ *result = LRESULT(filterResult);
++ return true;
++ }
++ return false;
++}
++
++// Send to QWindowSystemInterface
++bool QWindowsContext::filterNativeEvent(QWindow *window, MSG *msg, LRESULT *result)
++{
++ long filterResult = 0;
++ if (QWindowSystemInterface::handleNativeEvent(window, nativeEventType(), &msg, \
&filterResult)) { ++ *result = LRESULT(filterResult);
++ return true;
++ }
++ return false;
++}
++
++QT_END_NAMESPACE
+--
+2.17.1
+
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 93bb2a47ea6..00000000000
--- 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 index \
ff9ddf96e14..629530cbc48 100644
--- 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
@@ -1,50 +1,159 @@
-commit 644ff9428853f138649de0419de4b49bf41bc738
-Author: Oliver Wolff <oliver.wolff@qt.io>
-Date: Tue Nov 28 13:30:52 2017 +0100
+From 55100c8f5bb5d951fe20255ef99e02d26f5a8323 Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:53:53 +0200
+Subject: [PATCH 7/8] gerrit-189539-ANGLE-mingw-fix.patch
- 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 <andre.rocha@qt.io>
- Reviewed-by: Andy Shaw <andy.shaw@qt.io>
- (cherry picked from commit 6508fdca1dcc7105947befadba272d0fd4bbc27f)
+---
+ qtbase/src/angle/src/common/common.pri | 16 +------
+ qtbase/src/gui/configure.json | 14 ++++--
+ qtbase/src/gui/configure.pri | 64 ++++++++++++++++++++------
+ 3 files changed, 59 insertions(+), 35 deletions(-)
-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
+diff --git a/qtbase/src/angle/src/common/common.pri \
b/qtbase/src/angle/src/common/common.pri +index c1fad1495..6a558a957 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
- 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
+-# 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 219385a10..41241597f 100644
+--- a/qtbase/src/gui/configure.json
++++ b/qtbase/src/gui/configure.json
+@@ -656,11 +656,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",
+@@ -909,10 +912,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 fcd2d1f73..39a5b987a 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_qpaDefaultPlatform) {
+ name =
+ !isEmpty(config.input.qpa_default_platform): name = \
$$config.input.qpa_default_platform +--
+2.17.1
+
diff --git a/3rdparty/ext_qt/mac-default.patch b/3rdparty/ext_qt/mac-default.patch
deleted file mode 100644
index 016240c48c4..00000000000
--- a/3rdparty/ext_qt/mac-default.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- old/default_pre.prf 2016-06-10 02:48:56.000000000 -0400
-+++ new/default_pre.prf 2016-09-21 02:39:08.000000000 -0400
-@@ -12,7 +12,7 @@
- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use \
xcode-select to choose Xcode installation path.")
-
- # Make sure Xcode is set up properly
-- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
-+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
- error("Xcode not set up properly. You may need to confirm the license \
agreement by running /usr/bin/xcodebuild.")
- }
-
diff --git a/3rdparty/ext_qt/mac_standardpaths_qtbug-61159.diff \
b/3rdparty/ext_qt/mac_standardpaths_qtbug-61159.diff deleted file mode 100644
index b0a33ed8337..00000000000
--- a/3rdparty/ext_qt/mac_standardpaths_qtbug-61159.diff
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/src/corelib/io/qstandardpaths_mac.mm \
b/src/corelib/io/qstandardpaths_mac.mm
-index e25339a..3bb7a78 100644
---- a/src/corelib/io/qstandardpaths_mac.mm
-+++ b/src/corelib/io/qstandardpaths_mac.mm
-@@ -196,42 +196,31 @@
- it != masks.end(); ++it) {
- const QString path = baseWritableLocation(type, *it, true);
- if (!path.isEmpty() && !dirs.contains(path))
- dirs.append(path);
- }
- }
-
- if (type == AppDataLocation || type == AppLocalDataLocation) {
- CFBundleRef mainBundle = CFBundleGetMainBundle();
- if (mainBundle) {
-- CFURLRef bundleUrl = CFBundleCopyBundleURL(mainBundle);
-- CFStringRef cfBundlePath = CFURLCopyFileSystemPath(bundleUrl, \
kCFURLPOSIXPathStyle);
-- QString bundlePath = QString::fromCFString(cfBundlePath);
-- CFRelease(cfBundlePath);
-- CFRelease(bundleUrl);
--
-- CFURLRef resourcesUrl = CFBundleCopyResourcesDirectoryURL(mainBundle);
-- CFStringRef cfResourcesPath = CFURLCopyFileSystemPath(resourcesUrl,
-- kCFURLPOSIXPathStyle);
-- QString resourcesPath = QString::fromCFString(cfResourcesPath);
-- CFRelease(cfResourcesPath);
-- CFRelease(resourcesUrl);
--
-- // Handle bundled vs unbundled executables. CFBundleGetMainBundle() \
returns
-- // a valid bundle in both cases. CFBundleCopyResourcesDirectoryURL() \
returns
-- // an absolute path for unbundled executables.
-- if (resourcesPath.startsWith(QLatin1Char('/')))
-- dirs.append(resourcesPath);
-- else
-- dirs.append(bundlePath + resourcesPath);
-- }
-- }
-+ if (QCFType<CFURLRef> resourcesURL = \
CFBundleCopyResourcesDirectoryURL(mainBundle)) {
-+ if (QCFType<CFURLRef> absoluteResouresURL = \
CFURLCopyAbsoluteURL(resourcesURL)) {
-+ if (QCFType<CFStringRef> path = \
CFURLCopyFileSystemPath(absoluteResouresURL,
-+ \
kCFURLPOSIXPathStyle)) {
-+ dirs.append(QString::fromCFString(path));
-+ }
-+ }
-+ }
-+ }
-+ }
-+
- const QString localDir = writableLocation(type);
- if (!localDir.isEmpty())
- dirs.prepend(localDir);
- return dirs;
- }
-
- #ifndef QT_BOOTSTRAPPED
- QString QStandardPaths::displayName(StandardLocation type)
- {
- // Use "Home" instead of the user's Unix username
-
diff --git a/3rdparty/ext_qt/macdeploy-qt.diff b/3rdparty/ext_qt/macdeploy-qt.diff
index f871cff882b..7c8dafcba1a 100644
--- a/3rdparty/ext_qt/macdeploy-qt.diff
+++ b/3rdparty/ext_qt/macdeploy-qt.diff
@@ -1,22 +1,27 @@
-commit 26d6c76d5a51504ebabec5f4ea2643069743f962
-Author: Boudewijn Rempt <boud@valdyas.org>
-Date: Sat Nov 4 14:15:25 2017 +0100
+From ce15361bb0f077267454216a8e7e0ccfa6b56020 Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 12:04:52 +0200
+Subject: [PATCH 8/8] macdeploy-qt.diff
- Fix macdeployqt
+---
+ qttools/src/macdeployqt/macdeployqt/main.cpp | 16 ++++++-
+ qttools/src/macdeployqt/shared/shared.cpp | 47 ++++++++++++++++++++
+ qttools/src/macdeployqt/shared/shared.h | 1 +
+ 3 files changed, 62 insertions(+), 2 deletions(-)
diff --git a/qttools/src/macdeployqt/macdeployqt/main.cpp \
b/qttools/src/macdeployqt/macdeployqt/main.cpp
-index 5488a5f..1e90c72 100644
+index 90a5412b2..537af266b 100644
--- a/qttools/src/macdeployqt/macdeployqt/main.cpp
+++ b/qttools/src/macdeployqt/macdeployqt/main.cpp
-@@ -53,6 +53,7 @@ int main(int argc, char **argv)
- qDebug() << " -codesign=<ident> : Run codesign with the given identity \
on all executables"; +@@ -54,6 +54,7 @@ int main(int argc, char **argv)
qDebug() << " -appstore-compliant: Skip deployment of components that use \
private API";
qDebug() << " -libpath=<path> : Add the given path to the library \
search path"; + qDebug() << " -fs=<filesystem> : Set the filesystem used \
for the .dmg disk image (defaults to HFS+)"; + qDebug() << " \
-extra-plugins=<d> : Deploy plugins from given extra directory"; qDebug() << "";
qDebug() << "macdeployqt takes an application bundle as input and makes \
it";
qDebug() << "self-contained by copying in the Qt frameworks and plugins \
that";
-@@ -94,6 +95,7 @@ int main(int argc, char **argv)
+@@ -96,6 +97,7 @@ int main(int argc, char **argv)
extern QString codesignIdentiy;
extern bool appstoreCompliant;
extern bool deployFramework;
@@ -24,10 +29,10 @@ index 5488a5f..1e90c72 100644
for (int i = 2; i < argc; ++i) {
QByteArray argument = QByteArray(argv[i]);
-@@ -162,6 +164,14 @@ int main(int argc, char **argv)
- LogDebug() << "Argument found:" << argument;
- deployFramework = true;
-
+@@ -171,6 +173,13 @@ int main(int argc, char **argv)
+ LogError() << "Missing filesystem type";
+ else
+ filesystem = argument.mid(index+1);
+ } else if (argument.startsWith(QByteArray("-extra-plugins"))) {
+ LogDebug() << "Argument found:" << argument;
+ int index = argument.indexOf('=');
@@ -35,11 +40,10 @@ index 5488a5f..1e90c72 100644
+ LogError() << "Missing extra plugins directory";
+ else
+ extraPluginDirectories << argument.mid(index+1);
-+
} else if (argument.startsWith("-")) {
LogError() << "Unknown argument" << argument << "\n";
return 1;
-@@ -192,10 +202,13 @@ int main(int argc, char **argv)
+@@ -201,10 +210,13 @@ int main(int argc, char **argv)
deploymentInfo.deployedFrameworks = \
deploymentInfo.deployedFrameworks.toSet().toList(); }
@@ -56,10 +60,10 @@ index 5488a5f..1e90c72 100644
}
diff --git a/qttools/src/macdeployqt/shared/shared.cpp \
b/qttools/src/macdeployqt/shared/shared.cpp
-index 9575090..477f7a0 100644
+index bef3543dc..0e57d9063 100644
--- a/qttools/src/macdeployqt/shared/shared.cpp
+++ b/qttools/src/macdeployqt/shared/shared.cpp
-@@ -1120,6 +1120,43 @@ void deployPlugins(const ApplicationBundleInfo \
&appBundleInfo, const QString &pl +@@ -1130,6 +1130,43 @@ void deployPlugins(const \
ApplicationBundleInfo &appBundleInfo, const QString &pl }
}
@@ -103,7 +107,7 @@ index 9575090..477f7a0 100644
void createQtConf(const QString &appBundlePath)
{
// Set Plugins and imports paths. These are relative to App.app/Contents.
-@@ -1161,6 +1198,16 @@ void deployPlugins(const QString &appBundlePath, \
DeploymentInfo deploymentInfo, +@@ -1171,6 +1208,16 @@ void deployPlugins(const \
QString &appBundlePath, DeploymentInfo deploymentInfo,
deployPlugins(applicationBundle, deploymentInfo.pluginPath, \
pluginDestinationPath, deploymentInfo, useDebugLibs); }
@@ -121,7 +125,7 @@ index 9575090..477f7a0 100644
{
QString importDestinationPath = appBundlePath + "/Contents/Resources/qml/" + \
importName; diff --git a/qttools/src/macdeployqt/shared/shared.h \
b/qttools/src/macdeployqt/shared/shared.h
-index c173846..cceac3a 100644
+index c4d60ea0a..0b8d576fe 100644
--- a/qttools/src/macdeployqt/shared/shared.h
+++ b/qttools/src/macdeployqt/shared/shared.h
@@ -116,6 +116,7 @@ DeploymentInfo deployQtFrameworks(const QString &appBundlePath, \
const QStringLis @@ -132,3 +136,6 @@ index c173846..cceac3a 100644
bool deployQmlImports(const QString &appBundlePath, DeploymentInfo deploymentInfo, \
QStringList &qmlDirs); void changeIdentification(const QString &id, const QString \
&binaryPath); void changeInstallName(const QString &oldName, const QString &newName, \
const QString &binaryPath); +--
+2.17.1
+
diff --git a/3rdparty/ext_qt/qopengldebug-gles.patch \
b/3rdparty/ext_qt/qopengldebug-gles.patch index 448364ebbf4..8242ccbbfdb 100644
--- a/3rdparty/ext_qt/qopengldebug-gles.patch
+++ b/3rdparty/ext_qt/qopengldebug-gles.patch
@@ -1,5 +1,14 @@
+From 6f5a3165c03e285690e37fbcbeabe5fc16c5b932 Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:51:38 +0200
+Subject: [PATCH 6/8] qopengldebug-gles.patch
+
+---
+ qtbase/src/gui/opengl/qopengldebug.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
diff --git a/qtbase/src/gui/opengl/qopengldebug.cpp \
b/qtbase/src/gui/opengl/qopengldebug.cpp
-index f6c3af37dd..70bf7530e1 100644
+index f6c3af37d..70bf7530e 100644
--- a/qtbase/src/gui/opengl/qopengldebug.cpp
+++ b/qtbase/src/gui/opengl/qopengldebug.cpp
@@ -1413,7 +1413,7 @@ bool QOpenGLDebugLogger::initialize()
@@ -11,3 +20,6 @@ index f6c3af37dd..70bf7530e1 100644
);
GET_DEBUG_PROC_ADDRESS(glDebugMessageControl);
+--
+2.17.1
+
diff --git a/3rdparty/ext_qt/qt-no-motion-compression.diff \
b/3rdparty/ext_qt/qt-no-motion-compression.diff deleted file mode 100644
index bac29953b99..00000000000
--- a/3rdparty/ext_qt/qt-no-motion-compression.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git a/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp \
b/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
-index 05c0224..8fa9345 100644
---- a/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
-+++ b/qtbase/src/plugins/platforms/xcb/qxcbconnection.cpp
-@@ -1687,8 +1687,13 @@ void QXcbConnection::processXcbEvents()
- continue;
- }
-
-- if (compressEvent(event, i, eventqueue))
-- continue;
-+
-+ /**
-+ * (Krita) Do *NOT* compress any motion events! This is the
-+ * most weird thing one can do for a painting application!
-+ */
-+ // if (compressEvent(event, i, eventqueue))
-+ // continue;
-
- bool accepted = false;
- if (clipboard()->processIncr())
diff --git a/3rdparty/ext_qt/qtgui-private-headers.diff \
b/3rdparty/ext_qt/qtgui-private-headers.diff index 3e719feab61..81cf1fd9e53 100644
--- a/3rdparty/ext_qt/qtgui-private-headers.diff
+++ b/3rdparty/ext_qt/qtgui-private-headers.diff
@@ -1,12 +1,31 @@
+From 74271b0ebb277d51ed4baa70cfb1572acd7dae8d Mon Sep 17 00:00:00 2001
+From: Boudewijn Rempt <boud@valdyas.org>
+Date: Mon, 23 Jul 2018 11:43:18 +0200
+Subject: [PATCH 2/8] qtgui-private-headers.diff
+
+---
+ qtbase/mkspecs/features/create_cmake.prf | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
diff --git a/qtbase/mkspecs/features/create_cmake.prf \
b/qtbase/mkspecs/features/create_cmake.prf
-index 11fb52a..aec9ea9 100644
+index 2ed708e08..b82393854 100644
--- a/qtbase/mkspecs/features/create_cmake.prf
+++ b/qtbase/mkspecs/features/create_cmake.prf
-@@ -30,7 +30,6 @@ CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
+@@ -28,10 +28,10 @@ CMAKE_OUT_DIR = $$MODULE_BASE_OUTDIR/lib/cmake
+
+ CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
+
+-!generated_privates {
+- isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
\ +- CMAKE_NO_PRIVATE_INCLUDES = true
+-}
++#!generated_privates {
++# isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
\ ++# CMAKE_NO_PRIVATE_INCLUDES = true
++#}
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 = \
+--
+2.17.1
+
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic