Commit a3977a34 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Update ext_qt to Qt 5.12.1 on Windows target

The follwoing patches has been dropped:

1) private headers (I'm not sure it is still needed)
2) invisible panels in fullscreen mode (it looks like it works fine now)
3) windows store wrap crash (already in 5.12.1)
4) QTBUG 57299 (QTemporaryFile problem) (already in 5.12.1)
parent 4922d1a7
diff --git a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
index e6e6ee8b1a..89143b6d3f 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -240,9 +240,6 @@ struct QWindowsContextPrivate {
From 16a528dfc3ef30fee213026391c923d4d19fd4a0 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Mon, 11 Feb 2019 17:51:39 +0300
Subject: [PATCH 1/4] disable wintab
Change-Id: I10095ac8c486fcccb97f4a8d7036441eea6a1bc0
---
.../platforms/windows/qwindowscontext.cpp | 24 -------------------
1 file changed, 24 deletions(-)
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
index 1f80ac5872..ded8130398 100644
--- a/src/plugins/platforms/windows/qwindowscontext.cpp
+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
@@ -265,9 +265,6 @@ struct QWindowsContextPrivate {
QWindowsMimeConverter m_mimeConverter;
QWindowsScreenManager m_screenManager;
QSharedPointer<QWindowCreationContext> m_creationContext;
......@@ -10,17 +20,9 @@ index e6e6ee8b1a..89143b6d3f 100644
- QScopedPointer<QWindowsTabletSupport> m_tabletSupport;
-#endif
const HRESULT m_oleInitializeResult;
const QByteArray m_eventType;
QWindow *m_lastActiveWindow = nullptr;
@@ -281,17 +278,10 @@ QWindowsContext::QWindowsContext() :
const QByteArray bv = qgetenv("QT_QPA_VERBOSE");
if (!bv.isEmpty())
QLoggingCategory::setFilterRules(QString::fromLocal8Bit(bv));
-#if QT_CONFIG(tabletevent)
- d->m_tabletSupport.reset(QWindowsTabletSupport::create());
- qCDebug(lcQpaTablet) << "Tablet support: " << (d->m_tabletSupport.isNull() ? QStringLiteral("None") : d->m_tabletSupport->description());
-#endif
}
bool m_asyncExpose = false;
@@ -308,9 +305,6 @@ QWindowsContext::QWindowsContext() :
QWindowsContext::~QWindowsContext()
{
......@@ -30,7 +32,20 @@ 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)
@@ -357,12 +351,7 @@ bool QWindowsContext::initTouch(unsigned integrationOptions)
bool QWindowsContext::initTablet(unsigned integrationOptions)
{
Q_UNUSED(integrationOptions);
-#if QT_CONFIG(tabletevent)
- d->m_tabletSupport.reset(QWindowsTabletSupport::create());
- return true;
-#else
return false;
-#endif
}
bool QWindowsContext::initPointer(unsigned integrationOptions)
@@ -383,12 +372,7 @@ bool QWindowsContext::initPointer(unsigned integrationOptions)
void QWindowsContext::setTabletAbsoluteRange(int a)
{
......@@ -42,8 +57,8 @@ index e6e6ee8b1a..89143b6d3f 100644
-#endif
}
int QWindowsContext::processDpiAwareness()
@@ -702,11 +687,7 @@ QWindowsScreenManager &QWindowsContext::screenManager()
void QWindowsContext::setDetectAltGrModifier(bool a)
@@ -799,11 +783,7 @@ QWindowsScreenManager &QWindowsContext::screenManager()
QWindowsTabletSupport *QWindowsContext::tabletSupport() const
{
......@@ -55,7 +70,7 @@ index e6e6ee8b1a..89143b6d3f 100644
}
/*!
@@ -1112,10 +1093,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
@@ -1288,10 +1268,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
*result = LRESULT(MA_NOACTIVATE);
return true;
}
......@@ -66,3 +81,6 @@ index e6e6ee8b1a..89143b6d3f 100644
if (platformWindow->testFlag(QWindowsWindow::BlockedByModal))
if (const QWindow *modalWindow = QGuiApplication::modalWindow()) {
QWindowsWindow *platformWindow = QWindowsWindow::windowsWindowOf(modalWindow);
--
2.20.1.windows.1
From 674cfce97c4972176d2bcb55d7013c0ac2190029 Mon Sep 17 00:00:00 2001
From 9081571e58ceeaa4c623c83ecb41b04dfc7d90f9 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
Subject: [PATCH 2/4] Don't request the MIME image every time Windows asks for
the list of supported types
Change-Id: I05516d83dc4e0f192bc94f92cefc722f25dae4d4
---
qtbase/src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++---
src/plugins/platforms/windows/qwindowsmime.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
index a8264b5..90d646b 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1081,12 +1081,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index ff0dccb0d9..a702a2a90f 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1082,12 +1082,15 @@ bool QWindowsMimeImage::canConvertToMime(const QString &mimeType, IDataObject *p
bool QWindowsMimeImage::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
{
int cf = getCf(formatetc);
......@@ -33,5 +33,5 @@ index a8264b5..90d646b 100644
bool QWindowsMimeImage::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
--
2.6.4
2.20.1.windows.1
From 5e5026beb420018266d3d00fdb530bb714a841a6 Mon Sep 17 00:00:00 2001
From 6ce23924948d9697e07681bef44f0a47f9fd0d09 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
Subject: [PATCH 3/4] Hack: always return we support DIBV5
Asking for the entire image may be too expensive
Change-Id: I44c38fad73f1bb5859eb58b941054eeb6c3c6b66
---
qtbase/src/plugins/platforms/windows/qwindowsmime.cpp | 4 +---
src/plugins/platforms/windows/qwindowsmime.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
index 90d646b..ef97db7 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1052,9 +1052,7 @@ QVector<FORMATETC> QWindowsMimeImage::formatsForMime(const QString &mimeType, co
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index a702a2a90f..03f8948a86 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -1055,9 +1055,7 @@ QVector<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.20.1.windows.1
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
https://bugreports.qt.io/browse/QTBUG-41309
---
qtbase/src/plugins/platforms/windows/qwindowswindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
index 9c6cb53..d0829e3 100644
--- a/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/qtbase/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1769,7 +1769,7 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
const UINT swpf = SWP_FRAMECHANGED | SWP_NOACTIVATE;
const bool wasSync = testFlag(SynchronousGeometryChangeEvent);
setFlag(SynchronousGeometryChangeEvent);
- SetWindowPos(m_data.hwnd, HWND_TOP, r.left(), r.top(), r.width(), r.height(), swpf);
+ SetWindowPos(m_data.hwnd, HWND_TOP, r.left()-1, r.top()-1, r.width()+2, r.height()+2, swpf);
if (!wasSync)
clearFlag(SynchronousGeometryChangeEvent);
QWindowSystemInterface::handleGeometryChange(window(), r);
--
2.7.4.windows.1
diff --git a/qtbase/src/gui/opengl/qopengldebug.cpp b/qtbase/src/gui/opengl/qopengldebug.cpp
index f6c3af37dd..70bf7530e1 100644
--- a/qtbase/src/gui/opengl/qopengldebug.cpp
+++ b/qtbase/src/gui/opengl/qopengldebug.cpp
@@ -1413,7 +1413,7 @@ bool QOpenGLDebugLogger::initialize()
From 4c1e4e693307c3169c6db488ad6bf6cff6aae864 Mon Sep 17 00:00:00 2001
From: Dmitry Kazakov <dimula73@gmail.com>
Date: Mon, 11 Feb 2019 18:07:20 +0300
Subject: [PATCH 4/4] Fix debug on openGL ES
Change-Id: I08d1adf87b305c380a0f2177edf4ff9de109e4d6
---
src/gui/opengl/qopengldebug.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gui/opengl/qopengldebug.cpp b/src/gui/opengl/qopengldebug.cpp
index 2e628a2bd5..9f1bb76869 100644
--- a/src/gui/opengl/qopengldebug.cpp
+++ b/src/gui/opengl/qopengldebug.cpp
@@ -1366,7 +1366,7 @@ bool QOpenGLDebugLogger::initialize()
#define GET_DEBUG_PROC_ADDRESS(procName) \
d->procName = reinterpret_cast< qt_ ## procName ## _t >( \
......@@ -11,3 +21,6 @@ index f6c3af37dd..70bf7530e1 100644
);
GET_DEBUG_PROC_ADDRESS(glDebugMessageControl);
--
2.20.1.windows.1
......@@ -33,17 +33,12 @@ 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
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/disable-wintab.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qtgui-private-headers.diff
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Hack-always-return-we-support-DIBV5.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-for-fullscreen-workaround.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/qopengldebug-gles.patch
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-189539-ANGLE-mingw-fix.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/gerrit-212811_qtbase-angle-d3d11-warp-crash-fix.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/QTBUG-57299.diff
URL https://download.qt.io/archive/qt/5.12/5.12.1/single/qt-everywhere-src-5.12.1.zip
URL_HASH SHA1=5ba3e56475912e8784f825fd8d0d139ec5eca8b3
PATCH_COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0001-disable-wintab.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0002-Don-t-request-the-MIME-image-every-time-Windows-asks.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0003-Hack-always-return-we-support-DIBV5.patch
COMMAND ${PATCH_COMMAND} -p1 -d qtbase -i ${CMAKE_CURRENT_SOURCE_DIR}/0004-Fix-debug-on-openGL-ES.patch
INSTALL_DIR ${EXTPREFIX_qt}
CONFIGURE_COMMAND <SOURCE_DIR>/configure.bat ${_QT_conf}
......
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/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)
commit 644ff9428853f138649de0419de4b49bf41bc738
Author: Oliver Wolff <oliver.wolff@qt.io>
Date: Tue Nov 28 13:30:52 2017 +0100
ANGLE: D3D11: Fix shared handle support detection for WARP when MinGW is used
The MinGW version we support supports IsWindows8OrGreater so that we can
check the windows version properly. As the OpenGL detection falls back
to WARP in case of RDP it was possible, that shared handles were wrongly
stated as supported, which caused crashes in users' code.
Task-number: QTBUG-64657
Change-Id: Iaca2bd169f2764cf6ec68a1d36112a735246b29a
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
(cherry picked from commit 6508fdca1dcc7105947befadba272d0fd4bbc27f)
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
index 0173311bc6..5118bdbe9c 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
@@ -2645,7 +2645,7 @@ bool Renderer11::getShareHandleSupport() const
if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP)
{
-#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__)
+#ifndef ANGLE_ENABLE_WINDOWS_STORE
if (!IsWindows8OrGreater())
{
// WARP on Windows 7 doesn't support shared handles
diff --git a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
index dc091b0497..f42ff2141b 100644
--- a/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
+++ b/src/angle/patches/0002-ANGLE-Fix-compilation-with-MinGW.patch
@@ -405,15 +405,6 @@ index ea84783..62badcc 100644
if (mD3d11Module)
{
-@@ -2618,7 +2642,7 @@ bool Renderer11::getShareHandleSupport() const
-
- if (deviceType == d3d11::ANGLE_D3D11_DEVICE_TYPE_WARP)
- {
--#ifndef ANGLE_ENABLE_WINDOWS_STORE
-+#if !defined(ANGLE_ENABLE_WINDOWS_STORE) && !defined(__GNUC__)
- if (!IsWindows8OrGreater())
- {
- // WARP on Windows 7 doesn't support shared handles
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
index 62e9816..b4e7761 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.h
diff --git a/qtbase/mkspecs/features/create_cmake.prf b/qtbase/mkspecs/features/create_cmake.prf
index 11fb52a..aec9ea9 100644
--- a/qtbase/mkspecs/features/create_cmake.prf
+++ b/qtbase/mkspecs/features/create_cmake.prf
@@ -30,7 +30,6 @@ CMAKE_MODULE_NAME = $$cmakeModuleName($${MODULE})
split_incpath {
CMAKE_ADD_SOURCE_INCLUDE_DIRS = true
- CMAKE_NO_PRIVATE_INCLUDES = true # Don't add private includes in the build dir which don't exist
CMAKE_SOURCE_INCLUDES = \
$$cmakeTargetPaths($$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/Qt$${CMAKE_MODULE_NAME})
CMAKE_SOURCE_PRIVATE_INCLUDES = \
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment