[vlc-commits] contrib: qt: Update to Qt 5.11.0
Martin Storsjö
git at videolan.org
Sat Jun 16 15:59:26 CEST 2018
vlc | branch: master | Martin Storsjö <martin at martin.st> | Fri Jun 15 10:37:30 2018 +0300| [3ad1521475a1f3a811cfa23f7026918f192c5fef] | committer: Martin Storsjö
contrib: qt: Update to Qt 5.11.0
This allows dropping most of the local patches.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3ad1521475a1f3a811cfa23f7026918f192c5fef
---
...implement-calculation-of-window-frames_56.patch | 271 ---------------------
...prefer-lower-value-when-rounding-fractio.patch} | 15 +-
...s-QPA-Disable-systray-notification-sounds.patch | 27 ++
...e-new-EnableNonClientDpiScaling-for-Wi_56.patch | 135 ----------
...-limit-command-line-length-when-not-actua.patch | 75 ------
...arfbuzz-Fix-building-for-win64-with-clang.patch | 35 ---
...ize-staticMetaObject-with-the-highest-use.patch | 103 --------
.../0007-Only-define-QT_FASTCALL-on-x86_32.patch | 36 ---
...xman-drawhelpers-on-windows-just-like-on-.patch | 39 ---
...-a-win32-clang-g-mkspec-for-clang-targeti.patch | 234 ------------------
contrib/src/qt/SHA512SUMS | 2 +-
contrib/src/qt/rules.mak | 28 +--
contrib/src/qt/systray-no-sound.patch | 13 -
13 files changed, 46 insertions(+), 967 deletions(-)
diff --git a/contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch b/contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
deleted file mode 100644
index f958f2bc56..0000000000
--- a/contrib/src/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From 81ead1ff68711fed609cb47b33b3906c14ed95d5 Mon Sep 17 00:00:00 2001
-From: Friedemann Kleint <Friedemann.Kleint at qt.io>
-Date: Mon, 14 Nov 2016 16:08:51 +0100
-Subject: [PATCH 1/2] Windows QPA: Reimplement calculation of window frames
-
-Instead of relying on AdjustWindowRectEx() and dirty-handling,
-capture the rectangles before and after the processing of
-WM_NCCALCSIZE and calculate the frame from that. This allows
-for changing window frames by handling WM_NCCALCSIZE and
-monitor-dependent window frames when using High DPI scaling.
-
-Task-number: QTBUG-53255
-Task-number: QTBUG-40578
-Task-number: QTBUG-56591
-Change-Id: If8364a5440a6324ea5d470bf5b74e68942285abe
-Reviewed-by: Tim Jenssen <tim.jenssen at qt.io>
-Reviewed-by: Oliver Wolff <oliver.wolff at qt.io>
----
- src/plugins/platforms/windows/qwindowscontext.cpp | 66 +++++++++++++++++++++--
- src/plugins/platforms/windows/qwindowscontext.h | 4 +-
- src/plugins/platforms/windows/qwindowswindow.cpp | 30 ++++-------
- src/plugins/platforms/windows/qwindowswindow.h | 2 +-
- 4 files changed, 74 insertions(+), 28 deletions(-)
-
-diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
-index b611843..9058993 100644
---- a/src/plugins/platforms/windows/qwindowscontext.cpp
-+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
-@@ -453,6 +453,11 @@ void QWindowsContext::setWindowCreationContext(const QSharedPointer<QWindowCreat
- d->m_creationContext = ctx;
- }
-
-+QSharedPointer<QWindowCreationContext> QWindowsContext::windowCreationContext() const
-+{
-+ return d->m_creationContext;
-+}
-+
- int QWindowsContext::defaultDPI() const
- {
- return d->m_defaultDPI;
-@@ -916,7 +921,9 @@ static inline QWindowsInputContext *windowsInputContext()
-
- bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
- QtWindows::WindowsEventType et,
-- WPARAM wParam, LPARAM lParam, LRESULT *result)
-+ WPARAM wParam, LPARAM lParam,
-+ LRESULT *result,
-+ QWindowsWindow **platformWindowPtr)
- {
- *result = 0;
-
-@@ -949,6 +956,7 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
- }
-
- QWindowsWindow *platformWindow = findPlatformWindow(hwnd);
-+ *platformWindowPtr = platformWindow;
- if (platformWindow) {
- filterResult = 0;
- if (QWindowSystemInterface::handleNativeEvent(platformWindow->window(), d->m_eventType, &msg, &filterResult)) {
-@@ -1144,9 +1152,6 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
- return true;
- case QtWindows::ThemeChanged: {
- // Switch from Aero to Classic changes margins.
-- const Qt::WindowFlags flags = platformWindow->window()->flags();
-- if ((flags & Qt::WindowType_Mask) != Qt::Desktop && !(flags & Qt::FramelessWindowHint))
-- platformWindow->setFlag(QWindowsWindow::FrameDirty);
- if (QWindowsTheme *theme = QWindowsTheme::instance())
- theme->windowsThemeChanged(platformWindow->window());
- return true;
-@@ -1318,6 +1323,37 @@ QTouchDevice *QWindowsContext::touchDevice() const
- return d->m_mouseHandler.touchDevice();
- }
-
-+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.
-
-@@ -1331,7 +1367,9 @@ extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPAR
- {
- LRESULT result;
- const QtWindows::WindowsEventType et = windowsEventType(message, wParam, lParam);
-- const bool handled = QWindowsContext::instance()->windowsProc(hwnd, message, et, wParam, lParam, &result);
-+ 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) << "EVENT: hwd=" << hwnd << eventName << hex << "msg=0x" << message
-@@ -1341,6 +1379,24 @@ extern "C" LRESULT QT_WIN_CALLBACK qWindowsWndProc(HWND hwnd, UINT message, WPAR
- }
- 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;
- }
-
-diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
-index 14baec9..dcac77c 100644
---- a/src/plugins/platforms/windows/qwindowscontext.h
-+++ b/src/plugins/platforms/windows/qwindowscontext.h
-@@ -210,12 +210,14 @@ public:
-
- inline bool windowsProc(HWND hwnd, UINT message,
- QtWindows::WindowsEventType et,
-- WPARAM wParam, LPARAM lParam, LRESULT *result);
-+ WPARAM wParam, LPARAM lParam, LRESULT *result,
-+ QWindowsWindow **platformWindowPtr);
-
- QWindow *keyGrabber() const;
- void setKeyGrabber(QWindow *hwnd);
-
- void setWindowCreationContext(const QSharedPointer<QWindowCreationContext> &ctx);
-+ QSharedPointer<QWindowCreationContext> windowCreationContext() const;
-
- void setTabletAbsoluteRange(int a);
- void setProcessDpiAwareness(QtWindows::ProcessDpiAwareness dpiAwareness);
-diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
-index b38d7c2..11ba9c1 100644
---- a/src/plugins/platforms/windows/qwindowswindow.cpp
-+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
-@@ -1630,7 +1630,6 @@ QWindowsWindowData QWindowsWindow::setWindowFlags_sys(Qt::WindowFlags wt,
- QWindowsWindowData result = m_data;
- result.flags = creationData.flags;
- result.embedded = creationData.embedded;
-- setFlag(FrameDirty);
- return result;
- }
-
-@@ -1638,7 +1637,6 @@ void QWindowsWindow::handleWindowStateChange(Qt::WindowState state)
- {
- qCDebug(lcQpaWindows) << __FUNCTION__ << this << window()
- << "\n from " << m_windowState << " to " << state;
-- setFlag(FrameDirty);
- m_windowState = state;
- QWindowSystemInterface::handleWindowStateChanged(window(), state);
- switch (state) {
-@@ -1715,8 +1713,6 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
-
- const bool visible = isVisible();
-
-- setFlag(FrameDirty);
--
- if ((oldState == Qt::WindowFullScreen) != (newState == Qt::WindowFullScreen)) {
- #ifdef Q_OS_WINCE
- HWND handle = FindWindow(L"HHTaskBar", L"");
-@@ -1826,7 +1822,6 @@ void QWindowsWindow::setStyle(unsigned s) const
- {
- qCDebug(lcQpaWindows) << __FUNCTION__ << this << window() << debugWinStyle(s);
- setFlag(WithinSetStyle);
-- setFlag(FrameDirty);
- SetWindowLongPtr(m_data.hwnd, GWL_STYLE, s);
- clearFlag(WithinSetStyle);
- }
-@@ -1835,7 +1830,6 @@ void QWindowsWindow::setExStyle(unsigned s) const
- {
- qCDebug(lcQpaWindows).nospace() << __FUNCTION__ << ' ' << this << ' ' << window()
- << " 0x" << QByteArray::number(s, 16);
-- setFlag(FrameDirty);
- SetWindowLongPtr(m_data.hwnd, GWL_EXSTYLE, s);
- }
-
-@@ -1909,22 +1903,17 @@ bool QWindowsWindow::handleGeometryChanging(MSG *message) const
- return QWindowsWindow::handleGeometryChangingMessage(message, window(), margins);
- }
-
--QMargins QWindowsWindow::frameMargins() const
-+void QWindowsWindow::setFrameMargins(const QMargins &newMargins)
- {
-- // Frames are invalidated by style changes (window state, flags).
-- // As they are also required for geometry calculations in resize
-- // event sequences, introduce a dirty flag mechanism to be able
-- // to cache results.
-- if (testFlag(FrameDirty)) {
-- // Always skip calculating style-dependent margins for windows claimed to be frameless.
-- // This allows users to remove the margins by handling WM_NCCALCSIZE with WS_THICKFRAME set
-- // to ensure Areo snap still works (QTBUG-40578).
-- m_data.frame = m_data.flags & Qt::FramelessWindowHint
-- ? QMargins(0, 0, 0, 0)
-- : QWindowsGeometryHint::frame(style(), exStyle());
-- clearFlag(FrameDirty);
-+ if (m_data.frame != newMargins) {
-+ qCDebug(lcQpaWindows) << __FUNCTION__ << window() << m_data.frame << "->" << newMargins;
-+ m_data.frame = newMargins;
- }
-- return m_data.frame + m_data.customMargins;
-+}
-+
-+QMargins QWindowsWindow::frameMargins() const
-+{
-+ return m_data.frame;
- }
-
- void QWindowsWindow::setOpacity(qreal level)
-@@ -2322,7 +2311,6 @@ void QWindowsWindow::setCustomMargins(const QMargins &newCustomMargins)
- const QPoint topLeft = currentFrameGeometry.topLeft();
- QRect newFrame = currentFrameGeometry.marginsRemoved(oldCustomMargins) + m_data.customMargins;
- newFrame.moveTo(topLeft);
-- setFlag(FrameDirty);
- qCDebug(lcQpaWindows) << __FUNCTION__ << oldCustomMargins << "->" << newCustomMargins
- << currentFrameGeometry << "->" << newFrame;
- SetWindowPos(m_data.hwnd, 0, newFrame.x(), newFrame.y(), newFrame.width(), newFrame.height(), SWP_NOZORDER | SWP_FRAMECHANGED);
-diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
-index 6fffa1e..0e150a8 100644
---- a/src/plugins/platforms/windows/qwindowswindow.h
-+++ b/src/plugins/platforms/windows/qwindowswindow.h
-@@ -119,7 +119,6 @@ public:
- {
- AutoMouseCapture = 0x1, //! Automatic mouse capture on button press.
- WithinSetParent = 0x2,
-- FrameDirty = 0x4, //! Frame outdated by setStyle, recalculate in next query.
- OpenGLSurface = 0x10,
- OpenGL_ES2 = 0x20,
- OpenGLDoubleBuffered = 0x40,
-@@ -177,6 +176,7 @@ public:
- static bool handleGeometryChangingMessage(MSG *message, const QWindow *qWindow, const QMargins &marginsDp);
- bool handleGeometryChanging(MSG *message) const;
- QMargins frameMargins() const Q_DECL_OVERRIDE;
-+ void setFrameMargins(const QMargins &newMargins);
-
- void setOpacity(qreal level) Q_DECL_OVERRIDE;
- void setMask(const QRegion ®ion) Q_DECL_OVERRIDE;
---
-2.9.0.windows.1
-
diff --git a/contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch b/contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
similarity index 62%
rename from contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
rename to contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
index 6721e73d0b..100e8033f0 100644
--- a/contrib/src/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
+++ b/contrib/src/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
@@ -1,25 +1,26 @@
-From 169f145af591e78c3edc68a5a02130c8fd0973c5 Mon Sep 17 00:00:00 2001
+From cf632f7a1a3a36b91d16ac9019620434ebda9e24 Mon Sep 17 00:00:00 2001
From: VideoLAN Buildbot <buildbot at videolan.org>
Date: Tue, 13 Feb 2018 09:31:44 +0000
-Subject: [PATCH] Windows QPA: prefer lower value when rounding fractional scaling
+Subject: [PATCH 1/2] Windows QPA: prefer lower value when rounding fractional
+ scaling
---
src/plugins/platforms/windows/qwindowsscreen.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp
-index 5accbe8..9b4cd55 100644
+index d56dc870ea..51c321f867 100644
--- a/src/plugins/platforms/windows/qwindowsscreen.cpp
+++ b/src/plugins/platforms/windows/qwindowsscreen.cpp
-@@ -258,7 +258,7 @@ qreal QWindowsScreen::pixelDensity() const
+@@ -260,7 +260,7 @@ qreal QWindowsScreen::pixelDensity() const
// the pixel density since it is reflects the Windows UI scaling.
// High DPI auto scaling should be disabled when the user chooses
// small fonts on a High DPI monitor, resulting in lower logical DPI.
-- return qRound(logicalDpi().first / 96);
-+ return ceil(logicalDpi().first / 96. - 0.5);
+- return qMax(1, qRound(logicalDpi().first / 96));
++ return qMax(1., ceil(logicalDpi().first / 96. - 0.5));
}
/*!
--
-2.11.0
+2.15.2 (Apple Git-101.1)
diff --git a/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch b/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
new file mode 100644
index 0000000000..f7d48681ca
--- /dev/null
+++ b/contrib/src/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
@@ -0,0 +1,27 @@
+From f76248e9c67927d3a403b43ff941f72117e427f0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <hugo at beauzee.fr>
+Date: Fri, 15 Jun 2018 09:59:42 +0300
+Subject: [PATCH 2/2] Windows QPA: Disable systray notification sounds
+
+---
+ src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+index 901d132ea5..c30fa0e76d 100644
+--- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
++++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp
+@@ -279,6 +279,10 @@ void QWindowsSystemTrayIcon::showMessage(const QString &title, const QString &me
+ }
+ tnd.hBalloonIcon = qt_pixmapToWinHICON(pm);
+ }
++
++ // Never play audio on notifications.
++ tnd.dwInfoFlags |= NIIF_NOSOUND;
++
+ tnd.hWnd = m_hwnd;
+ tnd.uTimeout = msecsIn <= 0 ? UINT(10000) : UINT(msecsIn); // 10s default
+ tnd.uFlags = NIF_INFO | NIF_SHOWTIP;
+--
+2.15.2 (Apple Git-101.1)
+
diff --git a/contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch b/contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
deleted file mode 100644
index ff7986dd29..0000000000
--- a/contrib/src/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 8f39b5247c4f7766553131688f5d5b7193327336 Mon Sep 17 00:00:00 2001
-From: Friedemann Kleint <Friedemann.Kleint at qt.io>
-Date: Mon, 7 Nov 2016 14:22:37 +0100
-Subject: [PATCH 2/2] Windows QPA: Use new EnableNonClientDpiScaling() for
- Windows decoration
-
-Use newly introduced EnableNonClientDpiScaling() function to fix
-the decoration having the wrong size in multimonitor setups with
-per-monitor DPI awareness.
-
-Task-number: QTBUG-53255
-Change-Id: Ic6e2f2a92f790259107d2a0837b96177cf3adb5f
-Reviewed-by: Tim Jenssen <tim.jenssen at qt.io>
----
- src/plugins/platforms/windows/qtwindowsglobal.h | 3 ++
- src/plugins/platforms/windows/qwindowscontext.cpp | 35 ++++++++++++++++++++++-
- src/plugins/platforms/windows/qwindowscontext.h | 7 +++++
- 3 files changed, 44 insertions(+), 1 deletion(-)
-
-diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h
-index 63c083d..e7e010d 100644
---- a/src/plugins/platforms/windows/qtwindowsglobal.h
-+++ b/src/plugins/platforms/windows/qtwindowsglobal.h
-@@ -87,6 +87,7 @@ enum WindowsEventType // Simplify event types
- TouchEvent = TouchEventFlag + 1,
- NonClientMouseEvent = NonClientEventFlag + MouseEventFlag + 1,
- NonClientHitTest = NonClientEventFlag + 2,
-+ NonClientCreate = NonClientEventFlag + 3,
- KeyEvent = KeyEventFlag + 1,
- KeyDownEvent = KeyEventFlag + KeyDownEventFlag + 1,
- KeyboardLayoutChangeEvent = KeyEventFlag + 2,
-@@ -164,6 +165,8 @@ inline QtWindows::WindowsEventType windowsEventType(UINT message, WPARAM wParamI
- return QtWindows::HideEvent;
- case WM_SIZE:
- return QtWindows::ResizeEvent;
-+ case WM_NCCREATE:
-+ return QtWindows::NonClientCreate;
- case WM_NCCALCSIZE:
- return QtWindows::CalculateSize;
- #ifndef Q_OS_WINCE
-diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
-index 9058993..ab0b3da 100644
---- a/src/plugins/platforms/windows/qwindowscontext.cpp
-+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
-@@ -140,6 +140,28 @@ static inline QWindowsSessionManager *platformSessionManager() {
- }
- #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.
-@@ -165,7 +187,8 @@ QWindowsUser32DLL::QWindowsUser32DLL() :
- registerTouchWindow(0), unregisterTouchWindow(0),
- getTouchInputInfo(0), closeTouchInputHandle(0), setProcessDPIAware(0),
- addClipboardFormatListener(0), removeClipboardFormatListener(0),
-- getDisplayAutoRotationPreferences(0), setDisplayAutoRotationPreferences(0)
-+ getDisplayAutoRotationPreferences(0), setDisplayAutoRotationPreferences(0),
-+ enableNonClientDpiScaling(0), getWindowDpiAwarenessContext(0), getAwarenessFromDpiAwarenessContext(0)
- {
- }
-
-@@ -188,6 +211,12 @@ void QWindowsUser32DLL::init()
- }
- getDisplayAutoRotationPreferences = (GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences");
- setDisplayAutoRotationPreferences = (SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences");
-+
-+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS10) { // Appears in 10.0.14393, October 2016
-+ enableNonClientDpiScaling = (EnableNonClientDpiScaling)library.resolve("EnableNonClientDpiScaling");
-+ getWindowDpiAwarenessContext = (GetWindowDpiAwarenessContext)library.resolve("GetWindowDpiAwarenessContext");
-+ getAwarenessFromDpiAwarenessContext = (GetAwarenessFromDpiAwarenessContext)library.resolve("GetAwarenessFromDpiAwarenessContext");
-+ }
- }
-
- bool QWindowsUser32DLL::initTouch()
-@@ -1040,6 +1069,10 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message,
- case QtWindows::MoveEvent:
- d->m_creationContext->obtainedGeometry.moveTo(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
- return true;
-+ case QtWindows::NonClientCreate:
-+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_WINDOWS10 && d->m_creationContext->window->isTopLevel())
-+ enableNonClientDpiScaling(msg.hwnd);
-+ return false;
- case QtWindows::CalculateSize:
- return QWindowsGeometryHint::handleCalculateSize(d->m_creationContext->customMargins, msg, result);
- case QtWindows::GeometryChangingEvent:
-diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
-index dcac77c..156ede5 100644
---- a/src/plugins/platforms/windows/qwindowscontext.h
-+++ b/src/plugins/platforms/windows/qwindowscontext.h
-@@ -96,6 +96,9 @@ struct QWindowsUser32DLL
- typedef BOOL (WINAPI *RemoveClipboardFormatListener)(HWND);
- typedef BOOL (WINAPI *GetDisplayAutoRotationPreferences)(DWORD *);
- typedef BOOL (WINAPI *SetDisplayAutoRotationPreferences)(DWORD);
-+ typedef BOOL (WINAPI *EnableNonClientDpiScaling)(HWND);
-+ typedef int (WINAPI *GetWindowDpiAwarenessContext)(HWND);
-+ typedef int (WINAPI *GetAwarenessFromDpiAwarenessContext)(int);
-
- // Functions missing in Q_CC_GNU stub libraries.
- SetLayeredWindowAttributes setLayeredWindowAttributes;
-@@ -122,6 +125,10 @@ struct QWindowsUser32DLL
- // Rotation API
- GetDisplayAutoRotationPreferences getDisplayAutoRotationPreferences;
- SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences;
-+
-+ EnableNonClientDpiScaling enableNonClientDpiScaling;
-+ GetWindowDpiAwarenessContext getWindowDpiAwarenessContext;
-+ GetAwarenessFromDpiAwarenessContext getAwarenessFromDpiAwarenessContext;
- };
-
- struct QWindowsShell32DLL
---
-2.9.0.windows.1
-
diff --git a/contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch b/contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
deleted file mode 100644
index 5654d7421a..0000000000
--- a/contrib/src/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 767c2a2e339babcff9383d539f59479586444dd5 Mon Sep 17 00:00:00 2001
-From: Oswald Buddenhagen <oswald.buddenhagen at qt.io>
-Date: Mon, 7 Aug 2017 12:17:06 +0200
-Subject: [PATCH 4/9] qmake: don't limit command line length when not actually
- on windows
-
-QMAKE_LINK_OBJECT_MAX is actually a property of the host, not the
-target.
-
-this works around binutil's inability to use thin LTO objects in
-conjunction with an MRI script
-(https://sourceware.org/bugzilla/show_bug.cgi?id=21702).
-
-Task-number: QTBUG-61335
-Change-Id: I90a1334b9c905c433b35546e8f3f3b5089d2c65b
-Reviewed-by: Jake Petroules <jake.petroules at qt.io>
-Backport-Of: 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (v5.9.2)
-
-qmake: Handle QMAKE_LINK_OBJECT_MAX being unset for static libraries
-
-This was missed in 8bebded9.
-
-Task-number: QTBUG-63637
-Change-Id: I6be472430a9aa8f533def4fd6c14c8dbfe8b6f70
-Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen at qt.io>
-Backport-Of: 8cef809b16aac9d4c4163ff2e2e831adf70133c2 (v5.10.1)
----
- mkspecs/win32-g++/qmake.conf | 6 ++++--
- qmake/generators/win32/mingw_make.cpp | 6 ++++--
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
-index 2576a58e83..68d773499c 100644
---- a/mkspecs/win32-g++/qmake.conf
-+++ b/mkspecs/win32-g++/qmake.conf
-@@ -87,8 +87,10 @@ QMAKE_LFLAGS_CXX11 =
- QMAKE_LFLAGS_CXX14 =
- QMAKE_LFLAGS_CXX1Z =
- QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
--QMAKE_LINK_OBJECT_MAX = 10
--QMAKE_LINK_OBJECT_SCRIPT = object_script
-+equals(QMAKE_HOST.os, Windows) {
-+ QMAKE_LINK_OBJECT_MAX = 10
-+ QMAKE_LINK_OBJECT_SCRIPT = object_script
-+}
- QMAKE_PREFIX_SHLIB =
- QMAKE_EXTENSION_SHLIB = dll
- QMAKE_PREFIX_STATICLIB = lib
-diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
-index 96fd24cd31..c1609027f3 100644
---- a/qmake/generators/win32/mingw_make.cpp
-+++ b/qmake/generators/win32/mingw_make.cpp
-@@ -284,7 +284,8 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
-
- void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
- {
-- if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
-+ const ProString &objmax = project->first("QMAKE_LINK_OBJECT_MAX");
-+ if (objmax.isEmpty() || project->values("OBJECTS").count() < objmax.toInt()) {
- objectsLinkLine = "$(OBJECTS)";
- } else if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
- QString ar_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
-@@ -323,7 +324,8 @@ void MingwMakefileGenerator::writeBuildRulesPart(QTextStream &t)
- if(!project->isEmpty("QMAKE_PRE_LINK"))
- t << "\n\t" <<var("QMAKE_PRE_LINK");
- if(project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
-- if (project->values("OBJECTS").count() < var("QMAKE_LINK_OBJECT_MAX").toInt()) {
-+ const ProString &objmax = project->first("QMAKE_LINK_OBJECT_MAX");
-+ if (objmax.isEmpty() || project->values("OBJECTS").count() < objmax.toInt()) {
- t << "\n\t$(LIB) $(DESTDIR_TARGET) " << objectsLinkLine << " " ;
- } else {
- t << "\n\t" << objectsLinkLine << " " ;
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch b/contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
deleted file mode 100644
index feade28fbe..0000000000
--- a/contrib/src/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 43c31ab3146e144eb1938211803476a8fb3e44f2 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 11 Nov 2017 16:59:11 +0200
-Subject: [PATCH 5/9] harfbuzz: Fix building for win64 with clang
-
-Clang errors out on casting from a pointer to a smaller integer
-type.
-
-This is an adapted backport of a newer upstream harfbuzz
-commit, 03b7a221f701a9b003890878e730ad175c3fdd86.
-
-Change-Id: I0de62d90008021aed6acf4e946ce1d346f9aac8c
-Reviewed-by: Friedemann Kleint <Friedemann.Kleint at qt.io>
-Reviewed-by: Konstantin Ritt <ritt.ks at gmail.com>
-Backport-Of: f663c83f9d08f21bf6d96405456bd5864422b173 (v5.10.1)
----
- src/3rdparty/harfbuzz-ng/src/hb-private.hh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/3rdparty/harfbuzz-ng/src/hb-private.hh b/src/3rdparty/harfbuzz-ng/src/hb-private.hh
-index 53e0510a92..5170a8f393 100644
---- a/src/3rdparty/harfbuzz-ng/src/hb-private.hh
-+++ b/src/3rdparty/harfbuzz-ng/src/hb-private.hh
-@@ -671,7 +671,7 @@ _hb_debug_msg_va (const char *what,
- fprintf (stderr, "%-10s", what ? what : "");
-
- if (obj)
-- fprintf (stderr, "(%0*lx) ", (unsigned int) (2 * sizeof (void *)), (unsigned long) obj);
-+ fprintf (stderr, "(%*p) ", (unsigned int) (2 * sizeof (void *)), obj);
- else
- fprintf (stderr, " %*s ", (unsigned int) (2 * sizeof (void *)), "");
-
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch b/contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
deleted file mode 100644
index bb94b148b5..0000000000
--- a/contrib/src/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 4cc1f128c4b9894b94ffdd5d0a32257ead7a9cf5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Fri, 24 Nov 2017 10:10:23 +0200
-Subject: [PATCH 6/9] moc: Initialize staticMetaObject with the highest
- user-settable priority
-
-The referenced static meta object for the superclass might be in a
-different DLL. In this case, the whole QMetaObject can't be initialized
-all via preinitialized data in the data section of the binary, but must
-run code at runtime to fill in the value of the dllimported pointer.
-
-In these cases, both GCC and MSVC initialize as much as possible statically,
-while only filling in the dllimported values (QMetaObject::d::superdata)
-at runtime. Clang, on the other side, initializes the whole struct
-at runtime if some part of it needs runtime initialization, leaving
-the struct completely uninitialized before constructors are run.
-
-In C++, there are no guarantees for in what order constructors in
-different translation units are executed. This in particular means
-that there are no guarantees as to whether qRegisterWidgetsVariant()
-in qwidgetsvariants.cpp runs before or after the runtime initialization
-of QWidget::staticMetaObject.
-
-With GCC and MSVC, this doesn't seem to have mattered since only the
-superdata pointer of the staticMetaObject was uninitialized - everything
-else was initialized, and the superdata pointer doesn't seem to be
-accessed during qRegisterWidgetsVariant.
-
-With clang, the whole staticMetaObject is uninitialized, unless the
-staticMetaObject has been initialized before (and the initialization
-order is undefined).
-
-By setting a manual priority (which is a GCC extension that also
-clang supports) for the staticMetaObjects, we can be sure that
-these are initialized before the actual explicit constructor
-invocations (without any explicit initialization priority) that
-can access the staticMetaObjects.
-
-Change-Id: I64a82f12d690528567509791bae088b6304e189b
-Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart at woboq.com>
-Backport-Of: 74118a4784569046d5fdf5e08c99f8b1b43e9710 (v5.10.1)
-
-moc: Only use the init_priority attribute when targeting windows
-
-While both GCC and the GCC compatible clang support this attribute in
-general, GCC doesn't support it when targeting macOS, ending up with
-errors like these:
-error: 'init_priority' attribute is not supported on this platform
-
-This error isn't a property of the platform itself though, since
-clang supports the attribute just fine on macOS.
-
-The attribute is only used to work around an issue with dllimport
-on windows, so limit its use to that platform, to avoid issues
-with it potentially being unsupported on platforms other than
-macOS as well.
-
-This fixes compiling with GCC for macOS.
-
-Change-Id: I0235e6365635d73233951566c10ad869b26a0fc6
-Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
-Backport-Of: b97765efd452921f75c1d04820c4b5e9e9d49100 (5.11 branch)
----
- src/corelib/global/qglobal.h | 6 ++++++
- src/tools/moc/generator.cpp | 4 ++--
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
-index 4528005177..3a3f8d40da 100644
---- a/src/corelib/global/qglobal.h
-+++ b/src/corelib/global/qglobal.h
-@@ -499,6 +499,12 @@ typedef qptrdiff qintptr;
- # define Q_ALWAYS_INLINE inline
- #endif
-
-+#if defined(Q_CC_GNU) && defined(Q_OS_WIN)
-+# define QT_INIT_METAOBJECT __attribute__((init_priority(101)))
-+#else
-+# define QT_INIT_METAOBJECT
-+#endif
-+
- //defines the type for the WNDPROC on windows
- //the alignment needs to be forced for sse2 to not crash with mingw
- #if defined(Q_OS_WIN)
-diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
-index 99629f0427..8cbeb4ce78 100644
---- a/src/tools/moc/generator.cpp
-+++ b/src/tools/moc/generator.cpp
-@@ -525,9 +525,9 @@ void Generator::generateCode()
- // Finally create and initialize the static meta object
- //
- if (isQt)
-- fprintf(out, "const QMetaObject QObject::staticQtMetaObject = {\n");
-+ fprintf(out, "QT_INIT_METAOBJECT const QMetaObject QObject::staticQtMetaObject = {\n");
- else
-- fprintf(out, "const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData());
-+ fprintf(out, "QT_INIT_METAOBJECT const QMetaObject %s::staticMetaObject = {\n", cdef->qualified.constData());
-
- if (isQObject)
- fprintf(out, " { Q_NULLPTR, ");
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch b/contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
deleted file mode 100644
index a300b35997..0000000000
--- a/contrib/src/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From abaeb37bc3c7d18b0a74e0c932c9767f074d01d7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 11 Nov 2017 16:59:31 +0200
-Subject: [PATCH 7/9] Only define QT_FASTCALL on x86_32
-
-The __fastcall calling convention is silently ignored on other
-architectures. The GNU attribute regparm is allowed but doesn't
-make sense on x86_64. On other architectures, the attribute isn't
-supported at all.
-
-This fixes building with clang for MinGW/ARM and ARM64.
-
-Change-Id: Ice1c6eadd0e90b2e5e34736542ee49a25dc67fe6
-Reviewed-by: Lars Knoll <lars.knoll at qt.io>
-Reviewed-by: Thiago Macieira <thiago.macieira at intel.com>
-Backport-Of: bfc96c9c0e103c4fcfda25b9a6eaa80f4f19fba1 (v5.10.1)
----
- src/corelib/global/qglobal.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
-index 3523a38ebd..fe59804796 100644
---- a/src/corelib/global/qglobal.h
-+++ b/src/corelib/global/qglobal.h
-@@ -463,7 +463,7 @@ typedef qptrdiff qintptr;
- # define QT_ASCII_CAST_WARN
- #endif
-
--#if defined(__i386__) || defined(_WIN32) || defined(_WIN32_WCE)
-+#ifdef Q_PROCESSOR_X86_32
- # if defined(Q_CC_GNU)
- # define QT_FASTCALL __attribute__((regparm(3)))
- # elif defined(Q_CC_MSVC)
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch b/contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
deleted file mode 100644
index 67f1b6ab17..0000000000
--- a/contrib/src/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b8ce2e4e77afb42bdb440440e55fe6dbbb5c5851 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Sat, 6 Jan 2018 00:37:48 +0200
-Subject: [PATCH 8/9] Skip arm pixman drawhelpers on windows just like on ios
-
-Windows on arm (which uses clang, or msvc, but no gcc is available for
-that setup) can't assemble these sources.
-
-(On linux, builds with clang force deferring it to the external
-assembler, but for windows on arm, no gas compatible external
-assembler is available).
-
-Change-Id: I139572257884cfdc57d3c32061a8c2e28c6e24de
-Reviewed-by: Allan Sandfeld Jensen <allan.jensen at qt.io>
-Backport-Of: 8072c36eebd0648770e0f17fae408f33cb371c02 (v5.10.1)
-
-On revisions after 90f79db90a8db5b872040346bd58a27140b6a7a3 (v5.7.0),
-one also needs to backport f7524d73e33d00c76e55d996cdd4ea841ac6b7fa
-(part of v5.10.1).
----
- src/gui/painting/painting.pri | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
-index 1e516e4581..3fc3f1e3ef 100644
---- a/src/gui/painting/painting.pri
-+++ b/src/gui/painting/painting.pri
-@@ -104,7 +104,7 @@ AVX2_SOURCES += painting/qdrawhelper_avx2.cpp
- NEON_SOURCES += painting/qdrawhelper_neon.cpp
- NEON_HEADERS += painting/qdrawhelper_neon_p.h
- NEON_ASM += ../3rdparty/pixman/pixman-arm-neon-asm.S painting/qdrawhelper_neon_asm.S
--!ios:!contains(QT_ARCH, "arm64"): DEFINES += ENABLE_PIXMAN_DRAWHELPERS
-+!ios:!win32:!contains(QT_ARCH, "arm64"): DEFINES += ENABLE_PIXMAN_DRAWHELPERS
-
- MIPS_DSP_SOURCES += painting/qdrawhelper_mips_dsp.cpp
- MIPS_DSP_HEADERS += painting/qdrawhelper_mips_dsp_p.h painting/qt_mips_asm_dsp_p.h
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch b/contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
deleted file mode 100644
index 6ffcec7e89..0000000000
--- a/contrib/src/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From a616c80783949d1164a4f6e79f4db2291aad834c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin at martin.st>
-Date: Wed, 24 Jan 2018 10:41:58 +0200
-Subject: [PATCH 9/9] mkspecs: Add a win32-clang-g++ mkspec, for clang
- targeting mingw, like g++
-
-Change-Id: I427e46e6c34c2beeb2a815f1af512e4e8bd213c2
-Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen at qt.io>
-Backport-Of: 96e3985963a20a84bb8ff7032d77531641512d1d (5.11 branch)
-
-This is an adapted backport, keeping win32-clang-g++ similar to
-win32-g++, with the following differences:
-
--QMAKE_COMPILER = gcc
-+QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
-
--QMAKE_CC = $${CROSS_COMPILE}gcc
-+QMAKE_CC = $${CROSS_COMPILE}clang
-
--QMAKE_CFLAGS = -pipe -fno-keep-inline-dllexport
-+QMAKE_CFLAGS = -pipe
-
--QMAKE_CFLAGS_WARN_ON = -Wall -Wextra
-+QMAKE_CFLAGS_WARN_ON = -Wall -Wextra -Wno-ignored-attributes
-
--QMAKE_CXX = $${CROSS_COMPILE}g++
-+QMAKE_CXX = $${CROSS_COMPILE}clang++
-
--QMAKE_LINK = $${CROSS_COMPILE}g++
--QMAKE_LINK_C = $${CROSS_COMPILE}gcc
-+QMAKE_LINK = $${CROSS_COMPILE}clang++
-+QMAKE_LINK_C = $${CROSS_COMPILE}clang
-
-On branches before Qt 5.9, configure also needs a change like this,
-to support a mingw mkspec with a different name than the existing:
-- case `basename "$XPLATFORM"` in win32-g++*)
-+ case `basename "$XPLATFORM"` in win32-*g++*)
-
-This isn't necessary any longer after
-ab0cc3055d3d1f0faa98f96a7e8ae58b6ef6461a, which became part of v5.9.0.
----
- configure | 2 +-
- mkspecs/win32-clang-g++/qmake.conf | 118 ++++++++++++++++++++++++++++++++
- mkspecs/win32-clang-g++/qplatformdefs.h | 40 +++++++++++
- 3 files changed, 159 insertions(+), 1 deletion(-)
- create mode 100644 mkspecs/win32-clang-g++/qmake.conf
- create mode 100644 mkspecs/win32-clang-g++/qplatformdefs.h
-
-diff --git a/configure b/configure
-index 6ebeab30fe..fa0aae8300 100755
---- a/configure
-+++ b/configure
-@@ -1429,7 +1429,7 @@ while [ "$#" -gt 0 ]; do
- ;;
- xplatform)
- XPLATFORM="$VAL"
-- case `basename "$XPLATFORM"` in win32-g++*)
-+ case `basename "$XPLATFORM"` in win32-*g++*)
- XPLATFORM_MINGW=yes
- CFG_RPATH=no
- CFG_REDUCE_EXPORTS=no
-diff --git a/mkspecs/win32-clang-g++/qmake.conf b/mkspecs/win32-clang-g++/qmake.conf
-new file mode 100644
-index 0000000000..7673fd0549
---- /dev/null
-+++ b/mkspecs/win32-clang-g++/qmake.conf
-@@ -0,0 +1,118 @@
-+#
-+# qmake configuration for win32-clang-g++
-+#
-+# Written for MinGW-w64 / clang 6.0 or higher
-+#
-+# Cross compile example for x86_64-w64-mingw32-clang++:
-+# configure -xplatform win32-clang-g++ -device-option CROSS_COMPILE=x86_64-w64-mingw32-
-+#
-+
-+load(device_config)
-+include(../common/angle.conf)
-+
-+MAKEFILE_GENERATOR = MINGW
-+QMAKE_PLATFORM = win32 mingw
-+CONFIG += debug_and_release debug_and_release_target precompile_header
-+DEFINES += UNICODE
-+QMAKE_COMPILER_DEFINES += __GNUC__ WIN32
-+
-+QMAKE_EXT_OBJ = .o
-+QMAKE_EXT_RES = _res.o
-+
-+QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
-+
-+QMAKE_CC = $${CROSS_COMPILE}clang
-+QMAKE_LEX = flex
-+QMAKE_LEXFLAGS =
-+QMAKE_YACC = bison -y
-+QMAKE_YACCFLAGS = -d
-+QMAKE_CFLAGS = -pipe
-+QMAKE_CFLAGS_DEPS = -M
-+QMAKE_CFLAGS_WARN_ON = -Wall -Wextra -Wno-ignored-attributes
-+QMAKE_CFLAGS_WARN_OFF = -w
-+QMAKE_CFLAGS_RELEASE = -O2
-+QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO = -O2 -g
-+QMAKE_CFLAGS_DEBUG = -g
-+QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
-+QMAKE_CFLAGS_SPLIT_SECTIONS = -ffunction-sections
-+QMAKE_CFLAGS_SSE2 = -msse2 -mstackrealign
-+QMAKE_CFLAGS_SSE3 = -msse3
-+QMAKE_CFLAGS_SSSE3 = -mssse3
-+QMAKE_CFLAGS_SSE4_1 = -msse4.1
-+QMAKE_CFLAGS_SSE4_2 = -msse4.2
-+QMAKE_CFLAGS_AVX = -mavx
-+QMAKE_CFLAGS_AVX2 = -mavx2
-+QMAKE_CFLAGS_NEON = -mfpu=neon
-+
-+QMAKE_CXX = $${CROSS_COMPILE}clang++
-+QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
-+QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
-+QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
-+QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
-+QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
-+QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-+QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
-+QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
-+QMAKE_CXXFLAGS_THREAD = $$QMAKE_CFLAGS_THREAD
-+QMAKE_CXXFLAGS_RTTI_ON = -frtti
-+QMAKE_CXXFLAGS_RTTI_OFF = -fno-rtti
-+QMAKE_CXXFLAGS_EXCEPTIONS_ON = -fexceptions -mthreads
-+QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -fno-exceptions
-+QMAKE_CXXFLAGS_CXX11 = -std=c++0x
-+QMAKE_CXXFLAGS_CXX14 = -std=c++1y
-+QMAKE_CXXFLAGS_CXX1Z = -std=c++1z
-+QMAKE_CXXFLAGS_GNUCXX11 = -std=gnu++0x
-+QMAKE_CXXFLAGS_GNUCXX14 = -std=gnu++1y
-+QMAKE_CXXFLAGS_GNUCXX1Z = -std=gnu++1z
-+QMAKE_CXXFLAGS_SPLIT_SECTIONS = $$QMAKE_CFLAGS_SPLIT_SECTIONS
-+
-+QMAKE_INCDIR =
-+
-+QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
-+QMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src
-+QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
-+
-+QMAKE_LINK = $${CROSS_COMPILE}clang++
-+QMAKE_LINK_C = $${CROSS_COMPILE}clang
-+QMAKE_LFLAGS =
-+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
-+QMAKE_LFLAGS_EXCEPTIONS_OFF =
-+QMAKE_LFLAGS_RELEASE = -Wl,-s
-+QMAKE_LFLAGS_DEBUG =
-+QMAKE_LFLAGS_CONSOLE = -Wl,-subsystem,console
-+QMAKE_LFLAGS_WINDOWS = -Wl,-subsystem,windows
-+QMAKE_LFLAGS_DLL = -shared
-+QMAKE_LFLAGS_CXX11 =
-+QMAKE_LFLAGS_CXX14 =
-+QMAKE_LFLAGS_CXX1Z =
-+QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
-+equals(QMAKE_HOST.os, Windows) {
-+ QMAKE_LINK_OBJECT_MAX = 10
-+ QMAKE_LINK_OBJECT_SCRIPT = object_script
-+}
-+QMAKE_PREFIX_SHLIB =
-+QMAKE_EXTENSION_SHLIB = dll
-+QMAKE_PREFIX_STATICLIB = lib
-+QMAKE_EXTENSION_STATICLIB = a
-+QMAKE_LIB_EXTENSIONS = a dll.a
-+
-+QMAKE_LIBS =
-+QMAKE_LIBS_CORE = -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
-+QMAKE_LIBS_GUI = -lgdi32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lws2_32 -lole32 -luuid -luser32 -ladvapi32
-+QMAKE_LIBS_NETWORK = -lws2_32
-+QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
-+QMAKE_LIBS_OPENGL_ES2 = -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME} -lgdi32 -luser32
-+QMAKE_LIBS_OPENGL_ES2_DEBUG = -l$${LIBEGL_NAME}d -l$${LIBGLESV2_NAME}d -lgdi32 -luser32
-+QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-+QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
-+
-+QMAKE_IDL = midl
-+QMAKE_LIB = $${CROSS_COMPILE}ar -rc
-+QMAKE_RC = $${CROSS_COMPILE}windres
-+
-+QMAKE_STRIP = $${CROSS_COMPILE}strip
-+QMAKE_STRIPFLAGS_LIB += --strip-unneeded
-+QMAKE_OBJCOPY = $${CROSS_COMPILE}objcopy
-+QMAKE_NM = $${CROSS_COMPILE}nm -P
-+load(qt_config)
-diff --git a/mkspecs/win32-clang-g++/qplatformdefs.h b/mkspecs/win32-clang-g++/qplatformdefs.h
-new file mode 100644
-index 0000000000..906e724c19
---- /dev/null
-+++ b/mkspecs/win32-clang-g++/qplatformdefs.h
-@@ -0,0 +1,40 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2018 The Qt Company Ltd.
-+** Contact: https://www.qt.io/licensing/
-+**
-+** This file is part of the qmake spec 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 "../win32-g++/qplatformdefs.h"
---
-2.14.3 (Apple Git-98)
-
diff --git a/contrib/src/qt/SHA512SUMS b/contrib/src/qt/SHA512SUMS
index 54d29615d1..4cd02df10c 100644
--- a/contrib/src/qt/SHA512SUMS
+++ b/contrib/src/qt/SHA512SUMS
@@ -1 +1 @@
-19b505b6afb394a85dd27decf892fb7dccef89d33a41df458a9905d32a6dde23e76c11db9214bfaa7d9bddf48959d1579fad217d96d85333fdac94608c46389c qt-5.6.3.tar.xz
+9f68e00d432db6999f932da6ba759e465ea7d65461ef8db13765f16bd812f2ddd05beede1df3c6546165bc4924a6bd14cc0ff083defc43e2dce37ea20c561462 qt-5.11.0.tar.xz
diff --git a/contrib/src/qt/rules.mak b/contrib/src/qt/rules.mak
index e80fa0feb7..1ec0fcdda6 100644
--- a/contrib/src/qt/rules.mak
+++ b/contrib/src/qt/rules.mak
@@ -1,7 +1,7 @@
# Qt
-QT_VERSION := 5.6.3
-QT_URL := https://download.qt.io/official_releases/qt/5.6/$(QT_VERSION)/submodules/qtbase-opensource-src-$(QT_VERSION).tar.xz
+QT_VERSION := 5.11.0
+QT_URL := https://download.qt.io/official_releases/qt/5.11/$(QT_VERSION)/submodules/qtbase-everywhere-src-$(QT_VERSION).tar.xz
ifdef HAVE_MACOSX
#PKGS += qt
@@ -21,17 +21,9 @@ $(TARBALLS)/qt-$(QT_VERSION).tar.xz:
qt: qt-$(QT_VERSION).tar.xz .sum-qt
$(UNPACK)
- mv qtbase-opensource-src-$(QT_VERSION) qt-$(QT_VERSION)
- $(APPLY) $(SRC)/qt/0001-Windows-QPA-Reimplement-calculation-of-window-frames_56.patch
- $(APPLY) $(SRC)/qt/0002-Windows-QPA-Use-new-EnableNonClientDpiScaling-for-Wi_56.patch
- $(APPLY) $(SRC)/qt/0003-QPA-prefer-lower-value-when-rounding-fractional-scaling.patch
- $(APPLY) $(SRC)/qt/0004-qmake-don-t-limit-command-line-length-when-not-actua.patch
- $(APPLY) $(SRC)/qt/0005-harfbuzz-Fix-building-for-win64-with-clang.patch
- $(APPLY) $(SRC)/qt/0006-moc-Initialize-staticMetaObject-with-the-highest-use.patch
- $(APPLY) $(SRC)/qt/0007-Only-define-QT_FASTCALL-on-x86_32.patch
- $(APPLY) $(SRC)/qt/0008-Skip-arm-pixman-drawhelpers-on-windows-just-like-on-.patch
- $(APPLY) $(SRC)/qt/0009-mkspecs-Add-a-win32-clang-g-mkspec-for-clang-targeti.patch
- $(APPLY) $(SRC)/qt/systray-no-sound.patch
+ mv qtbase-everywhere-src-$(QT_VERSION) qt-$(QT_VERSION)
+ $(APPLY) $(SRC)/qt/0001-Windows-QPA-prefer-lower-value-when-rounding-fractio.patch
+ $(APPLY) $(SRC)/qt/0002-Windows-QPA-Disable-systray-notification-sounds.patch
$(MOVE)
ifdef HAVE_MACOSX
@@ -52,7 +44,7 @@ endif
QT_CONFIG := -static -opensource -confirm-license -no-pkg-config \
-no-sql-sqlite -no-gif -qt-libjpeg -no-openssl -no-opengl -no-dbus \
- -no-qml-debug -no-audio-backend -no-sql-odbc -no-pch \
+ -no-sql-odbc -no-pch \
-no-compile-examples -nomake examples -qt-zlib
QT_CONFIG += -release
@@ -74,16 +66,16 @@ QT_CONFIG += -release
rm -rf $(PREFIX)/lib/libQt5Bootstrap* $</lib/libQt5Bootstrap*
# Fix .pc files to remove debug version (d)
cd $(PREFIX)/lib/pkgconfig; for i in Qt5Core.pc Qt5Gui.pc Qt5Widgets.pc; do sed -i.orig -e 's/d\.a/.a/g' -e 's/d $$/ /' $$i; done
- # Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and Qt5Platform Support
- cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Gui/ -lqwindows -lQt5PlatformSupport -lQt5Gui/g' Qt5Gui.pc
+ # Fix Qt5Gui.pc file to include qwindows (QWindowsIntegrationPlugin) and platform support libraries
+ cd $(PREFIX)/lib/pkgconfig; sed -i.orig -e 's/ -lQt5Gui/ -lqwindows -lQt5ThemeSupport -lQt5FontDatabaseSupport -lQt5EventDispatcherSupport -lQt5WindowsUIAutomationSupport -lqtfreetype -lQt5Gui/g' Qt5Gui.pc
ifdef HAVE_CROSS_COMPILE
# Building Qt build tools for Xcompilation
cd $</include/QtCore; ln -sf $(QT_VERSION)/QtCore/private
cd $<; $(MAKE) -C qmake
- cd $<; $(MAKE) install_qmake install_mkspecs
+ cd $<; $(MAKE) sub-qmake-qmake-aux-pro-install_subtargets install_mkspecs
cd $</src/tools; \
for i in bootstrap uic rcc moc; \
- do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ LIB="$(HOST)-ar -rc" && $(MAKE) install); \
+ do (cd $$i; echo $$i && ../../../bin/qmake -spec $(QT_SPEC) QMAKE_RC=$(HOST)-windres && $(MAKE) clean && $(MAKE) CC=$(HOST)-gcc CXX=$(HOST)-g++ LINKER=$(HOST)-g++ LIB="$(HOST)-ar -rc" && $(MAKE) install); \
done
endif
touch $@
diff --git a/contrib/src/qt/systray-no-sound.patch b/contrib/src/qt/systray-no-sound.patch
deleted file mode 100644
index 0d80933161..0000000000
--- a/contrib/src/qt/systray-no-sound.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- qt/src/widgets/util/qsystemtrayicon_win.cpp.old
-+++ qt/src/widgets/util/qsystemtrayicon_win.cpp
-@@ -258,6 +258,10 @@ bool QSystemTrayIconSys::showMessage(con
- }
- if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
- tnd.dwInfoFlags |= NIIF_LARGE_ICON;
-+
-+ // Never play audio on notifications.
-+ tnd.dwInfoFlags |= NIIF_NOSOUND;
-+
- tnd.cbSize = notifyIconSize;
- tnd.hWnd = m_hwnd;
- tnd.uTimeout = uSecs;
More information about the vlc-commits
mailing list