Update Qt to 5.10.1
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 27 Feb 2018 14:05:51 +0000 (15:05 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 27 Feb 2018 14:05:51 +0000 (15:05 +0100)
* Makfile.am (EXTRA_DIST): Remove obsolte patches
* patches/qtbase/config-standardpaths.patch,
patches/qtbase/qtbase-mingw-fixes.patch,
patches/qtbase/relative-paths.patch: Refresh.

Makefile.am
packages/packages.current
patches/qtbase/config-standardpaths.patch
patches/qtbase/qtbase-mingw-fixes.patch
patches/qtbase/relative-paths.patch
patches/qtbase/windowsxp-support-revert-2.patch [deleted file]
patches/qtbase/windowsxp-support-revert.patch [deleted file]
patches/qtbase/windowsxp-support.patch [deleted file]

index 548e0f2..b836d80 100644 (file)
@@ -32,9 +32,6 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
         patches/qtbase/relative-paths.patch \
         patches/qtbase/qtbase-mingw-fixes.patch \
         patches/qtbase/config-standardpaths.patch \
-        patches/qtbase/windowsxp-support.patch \
-        patches/qtbase/windowsxp-support-revert.patch \
-        patches/qtbase/windowsxp-support-revert-2.patch \
         patches/qtwinextras/support-xp.patch \
         patches/w32pth-2.0.5/workaround-broken-libtool.patch \
         patches/qttools/disable-most-tools.patch \
index 69a7b33..841b86d 100644 (file)
@@ -346,47 +346,47 @@ file 1.60.0/boost_1_60_0.tar.bz2
 chk 686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b
 
 # Qt base
-# last changed: 2016-07-22
+# last changed: 2018-02-27
 # by: ah
-# verified: HTTPS https://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtbase-opensource-src-5.8.0.tar.xz.sha256
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qtbase-everywhere-src-5.10.1.tar.xz.sha256
 
 server http://download.qt.io/official_releases/qt/
 
-name qtbase-5.8.0.tar.xz
-file 5.8/5.8.0/submodules/qtbase-opensource-src-5.8.0.tar.xz
-chk c17111ae02a44dc7be1ec2cf979a47ee9e58edf4904041a525c21f4fa53fc005
+name qtbase-5.10.1.tar.xz
+file 5.10/5.10.1/submodules/qtbase-everywhere-src-5.10.1.tar.xz
+chk d8660e189caa5da5142d5894d328b61a4d3ee9750b76d61ad74e4eee8765a969
 
 # Qt Tools
-# last changed: 2016-07-22
+# last changed: 2018-02-27
 # by: ah
-# verified: HTTPS https://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qttools-opensource-src-5.8.0.tar.xz.sha256
-name qttools-5.8.0.tar.xz
-file 5.8/5.8.0/submodules/qttools-opensource-src-5.8.0.tar.xz
-chk 95ec8e76d393b6ba26ffff5041fce41946d2bf3aec1402c6533e24d9fc269d83
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qttools-everywhere-src-5.10.1.tar.xz.sha256
+name qttools-5.10.1.tar.xz
+file 5.10/5.10.1/submodules/qttools-everywhere-src-5.10.1.tar.xz
+chk f1ea441e5fe138756e6de3b60ab7d8d3051799eabe85a9408c995dfd4d048a53
 
 # Qt Winextras
-# last changed: 2016-07-22
+# last changed: 2018-02-27
 # by: ah
-# verified: HTTPS https://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtwinextras-opensource-src-5.8.0.tar.xz.sha256
-name qtwinextras-5.8.0.tar.xz
-file 5.8/5.8.0/submodules/qtwinextras-opensource-src-5.8.0.tar.xz
-chk 27ff7b94bd465709d5f8409b3e02a3a393e908613357b1edbf18ebbcb0c2c19c
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qtwinextras-everywhere-src-5.10.1.tar.xz.sha256
+name qtwinextras-5.10.1.tar.xz
+file 5.10/5.10.1/submodules/qtwinextras-everywhere-src-5.10.1.tar.xz
+chk 12401eea9abe87307b9aeba9d539ad403858ea43a99248421caf069f27b28917
 
 # Qt svg
-# last changed: 2016-07-22
+# last changed: 2018-02-27
 # by: ah
-# verified: HTTPS https://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qtsvg-opensource-src-5.8.0.tar.xz.sha256
-name qtsvg-5.8.0.tar.xz
-file 5.8/5.8.0/submodules/qtsvg-opensource-src-5.8.0.tar.xz
-chk 9873191c211ab4da9c0bc47b1e3549f475db4d448bba3175e0f86b24eefadc89
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qtsvg-everywhere-src-5.10.1.tar.xz.sha256
+name qtsvg-5.10.1.tar.xz
+file 5.10/5.10.1/submodules/qtsvg-everywhere-src-5.10.1.tar.xz
+chk 00e00c04abcc8363cf7d94ca8b16af61840995a4af23685d49fa4ccafa1c7f5a
 
-# Qt svg
-# last changed: 2017-08-22
+# Qt translations
+# last changed: 2018-02-27
 # by: ah
-# verified: HTTPS https://download.qt.io/official_releases/qt/5.8/5.8.0/submodules/qttranslations-opensource-src-5.8.0.tar.xz.sha256
-name qttranslations-5.8.0.tar.xz
-file 5.8/5.8.0/submodules/qttranslations-opensource-src-5.8.0.tar.xz
-chk 3b7cf72ec50bc2a02bf4e4427b184febac909dba0e02e1861321ca1629c3fc2e
+# verified: HTTPS https://download.qt.io/official_releases/qt/5.10/5.10.1/submodules/qttranslations-everywhere-src-5.10.1.tar.xz.sha256
+name qttranslations-5.10.1.tar.xz
+file 5.10/5.10.1/submodules/qttranslations-everywhere-src-5.10.1.tar.xz
+chk 1f6d840e3d04b00b976bc1a86ea2be9d61051b7c3455dc2b891fae61772643fd
 
 # KDE Frameworks generated by gen-frameworks.sh
 
index 9987aa7..c1483e6 100755 (executable)
-#! /bin/sh
+i#! /bin/sh
 patch -p1 -f -l $* < $0
 exit $?
 
-diff -Nru qtbase-5.6.1.orig/src/corelib/global/global.pri qtbase-5.6.1/src/corelib/global/global.pri
---- qtbase-5.6.1.orig/src/corelib/global/global.pri     2016-07-22 15:11:23.303466531 +0200
-+++ qtbase-5.6.1/src/corelib/global/global.pri  2016-07-22 15:11:49.940044214 +0200
-@@ -10,6 +10,7 @@
-         global/qnumeric_p.h \
-         global/qnumeric.h \
-         global/qglobalstatic.h \
-+        global/qlibraryinfo_p.h \
-         global/qlibraryinfo.h \
-         global/qlogging.h \
-         global/qtypeinfo.h \
-diff -Nru qtbase-5.6.1.orig/src/corelib/global/qlibraryinfo.cpp qtbase-5.6.1/src/corelib/global/qlibraryinfo.cpp
---- qtbase-5.6.1.orig/src/corelib/global/qlibraryinfo.cpp       2016-07-22 15:11:23.303466531 +0200
-+++ qtbase-5.6.1/src/corelib/global/qlibraryinfo.cpp    2016-07-22 15:11:49.940044214 +0200
-@@ -38,6 +38,7 @@
- #include "qsettings.h"
- #include "qlibraryinfo.h"
- #include "qscopedpointer.h"
-+#include "qlibraryinfo_p.h"
-
- #ifdef QT_BUILD_QMAKE
- QT_BEGIN_NAMESPACE
-@@ -77,37 +78,33 @@
- };
- Q_GLOBAL_STATIC(QLibrarySettings, qt_library_settings)
-
--class QLibraryInfoPrivate
--{
--public:
--    static QSettings *findConfiguration();
- #ifdef QT_BUILD_QMAKE
--    static bool haveGroup(QLibraryInfo::PathGroup group)
--    {
--        QLibrarySettings *ls = qt_library_settings();
--        return ls ? (group == QLibraryInfo::EffectiveSourcePaths
--                     ? ls->haveEffectiveSourcePaths
--                     : group == QLibraryInfo::EffectivePaths
--                       ? ls->haveEffectivePaths
--                       : group == QLibraryInfo::DevicePaths
--                         ? ls->haveDevicePaths
--                         : ls->havePaths) : false;
--    }
-+bool QLibraryInfoPrivate::haveGroup(QLibraryInfo::PathGroup group)
-+{
-+    QLibrarySettings *ls = qt_library_settings();
-+    return ls ? (group == QLibraryInfo::EffectiveSourcePaths
-+                    ? ls->haveEffectiveSourcePaths
-+                    : group == QLibraryInfo::EffectivePaths
-+                    ? ls->haveEffectivePaths
-+                    : group == QLibraryInfo::DevicePaths
-+                        ? ls->haveDevicePaths
-+                        : ls->havePaths) : false;
-+}
- #endif
--    static QSettings *configuration()
--    {
--        QLibrarySettings *ls = qt_library_settings();
--        if (ls) {
-+QSettings *QLibraryInfoPrivate::configuration()
-+{
-+    QLibrarySettings *ls = qt_library_settings();
-+    if (ls) {
- #ifndef QT_BUILD_QMAKE
--            if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != 0)
--                ls->load();
-+        if (ls->reloadOnQAppAvailable && QCoreApplication::instance() != 0)
-+            ls->load();
- #endif
--            return ls->settings.data();
--        } else {
--            return 0;
--        }
-+        return ls->settings.data();
-+    } else {
-+        return 0;
-     }
--};
-+}
-+
-
- static const char platformsSection[] = "Platforms";
-
-diff -Nru qtbase-5.6.1.orig/src/corelib/global/qlibraryinfo_p.h qtbase-5.6.1/src/corelib/global/qlibraryinfo_p.h
---- qtbase-5.6.1.orig/src/corelib/global/qlibraryinfo_p.h       1970-01-01 01:00:00.000000000 +0100
-+++ qtbase-5.6.1/src/corelib/global/qlibraryinfo_p.h    2016-07-22 15:11:49.940044214 +0200
-@@ -0,0 +1,61 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2015 The Qt Company Ltd.
-+** Contact: http://www.qt.io/licensing/
-+**
-+** This file is part of the QtCore module of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL21$
-+** 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 http://www.qt.io/terms-conditions. For further
-+** information use the contact form at http://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 2.1 or version 3 as published by the Free
-+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-+** following information to ensure the GNU Lesser General Public License
-+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** As a special exception, The Qt Company gives you certain additional
-+** rights. These rights are described in The Qt Company LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#ifndef QLIBRARYINFO_P_H
-+#define QLIBRARYINFO_P_H
-+
-+//
-+//  W A R N I N G
-+//  -------------
-+//
-+// This file is not part of the Qt API.  It exists purely as an
-+// implementation detail.  This header file may change from version to
-+// version without notice, or even be removed.
-+//
-+// We mean it.
-+//
-+
-+#include "qsettings.h"
-+#include "qlibraryinfo.h"
-+
-+class QLibraryInfoPrivate
-+{
-+public:
-+    static QSettings *findConfiguration();
-+#ifdef QT_BUILD_QMAKE
-+    static bool haveGroup(QLibraryInfo::PathGroup group);
-+#endif
-+    static QSettings *configuration();
-+};
-+
-+#endif
-\ No newline at end of file
 diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp qtbase-5.6.1/src/corelib/io/qstandardpaths.cpp
 --- qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp 2016-07-22 15:11:23.307466618 +0200
 +++ qtbase-5.6.1/src/corelib/io/qstandardpaths.cpp      2016-07-22 15:12:52.629403686 +0200
-@@ -41,6 +41,14 @@
- #include <qcoreapplication.h>
+@@ -56,6 +56,14 @@
+ #include <unistd.h>
  #endif
 
-+#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS) && !defined(QT_BOOTSTRAPPED)
-+#include "../global/qlibraryinfo_p.h"
++#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS)
 +#include <qsettings.h>
++#include <qcoreapplication.h>
 +#endif
 +#ifdef Q_OS_WIN
 +#include <windows.h>
@@ -168,12 +20,47 @@ diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp qtbase-5.6.1/src/c
  #ifndef QT_NO_STANDARDPATHS
 
  QT_BEGIN_NAMESPACE
-@@ -655,6 +663,55 @@
+@@ -671,6 +679,90 @@
      return qsp_testMode;
  }
 
 +static const char standardPathsSection[] = "StandardPaths";
 +
++static QSettings *findConfiguration()
++{
++#ifdef QT_BUILD_QMAKE
++    QString qtconfig = qmake_libraryInfoFile();
++    if (QFile::exists(qtconfig))
++        return new QSettings(qtconfig, QSettings::IniFormat);
++#else
++    QString qtconfig = QStringLiteral(":/qt/etc/qt.conf");
++    if (QFile::exists(qtconfig))
++        return new QSettings(qtconfig, QSettings::IniFormat);
++#ifdef Q_OS_DARWIN
++    CFBundleRef bundleRef = CFBundleGetMainBundle();
++    if (bundleRef) {
++        QCFType<CFURLRef> urlRef = CFBundleCopyResourceURL(bundleRef,
++                                                           QCFString(QLatin1String("qt.conf")),
++                                                           0,
++                                                           0);
++        if (urlRef) {
++            QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
++            qtconfig = QDir::cleanPath(path);
++            if (QFile::exists(qtconfig))
++                return new QSettings(qtconfig, QSettings::IniFormat);
++        }
++    }
++#endif
++    if (QCoreApplication::instance()) {
++        QDir pwd(QCoreApplication::applicationDirPath());
++        qtconfig = pwd.filePath(QLatin1String("qt.conf"));
++        if (QFile::exists(qtconfig))
++            return new QSettings(qtconfig, QSettings::IniFormat);
++    }
++#endif
++    return 0;     //no luck
++}
++
 +QString QStandardPaths::presetLocation(StandardLocation type)
 +{
 +#if !defined(QT_BUILD_QMAKE) && !defined(QT_NO_SETTINGS) && !defined(QT_BOOTSTRAPPED)
@@ -198,7 +85,7 @@ diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp qtbase-5.6.1/src/c
 +                                            << QStringLiteral("AppConfigLocation")
 +                                            << QStringLiteral("AppLocalDataLocation");
 +
-+    QScopedPointer<const QSettings> settings(QLibraryInfoPrivate::findConfiguration());
++    QScopedPointer<const QSettings> settings(findConfiguration());
 +    if (!settings.isNull()) {
 +        QString key = QLatin1String(standardPathsSection);
 +        key += QLatin1Char('/');
@@ -224,7 +111,7 @@ diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.cpp qtbase-5.6.1/src/c
 
  QT_END_NAMESPACE
 
-diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.h qtbase-5.6.1/src/corelib/io/qstandardpaths.h
+:diff -Nru qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.h qtbase-5.6.1/src/corelib/io/qstandardpaths.h
 --- qtbase-5.6.1.orig/src/corelib/io/qstandardpaths.h   2016-07-22 15:11:23.307466618 +0200
 +++ qtbase-5.6.1/src/corelib/io/qstandardpaths.h        2016-07-22 15:11:49.940044214 +0200
 @@ -92,6 +92,8 @@
index 2c1d615..ee19679 100755 (executable)
@@ -40,10 +40,10 @@ index d2358ca..6b1dc95 100644
 2.9.3
 
 
-From 9d8bca4d8c1d312cca4b161c93a091147dd7aa37 Mon Sep 17 00:00:00 2001
+From 68f406b40eb3708809c042dfaf41b5366b437308 Mon Sep 17 00:00:00 2001
 From: Tony Theodore <tonyt@logyst.com>
 Date: Sat, 16 Jul 2016 20:31:07 +1000
-Subject: [PATCH 2/5] Fix pkgconfig file and library naming
+Subject: [PATCH 2/6] Fix pkgconfig file and library naming
 
 See: https://codereview.qt-project.org/#/c/165394/
      https://bugreports.qt.io/browse/QTBUG-30898
@@ -68,10 +68,10 @@ Task-number: 30898
 Change-Id: If75336ec7d21a7ec0cb6d245fe87c64afcb5a644
 
 diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
-index 31d6285..8e24520 100644
+index e6a0d97f1a..5aefea28e5 100644
 --- a/mkspecs/features/qt_module.prf
 +++ b/mkspecs/features/qt_module.prf
-@@ -248,6 +248,10 @@ load(qt_installs)
+@@ -265,6 +265,10 @@ load(qt_installs)
 
  load(qt_targets)
 
@@ -82,45 +82,45 @@ index 31d6285..8e24520 100644
  # this builds on top of qt_common
  !internal_module:!lib_bundle:if(unix|mingw) {
      CONFIG += create_pc
-@@ -258,12 +262,12 @@ load(qt_targets)
+@@ -275,12 +279,12 @@ load(qt_targets)
          QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS/raw]
      QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
-     QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
+     QMAKE_PKGCONFIG_CFLAGS = -D$$MODULE_DEFINE -I${includedir}/$$MODULE_INCNAME
 -    QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt, "Qt$$QT_MAJOR_VERSION ")
 -    QMAKE_PKGCONFIG_FILE = $$replace(TARGET, ^Qt, Qt$$QT_MAJOR_VERSION)
 +    QMAKE_PKGCONFIG_NAME = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt$$QT_MAJOR_VERSION ")
 +    QMAKE_PKGCONFIG_FILE = $$TARGET
      for(i, MODULE_DEPENDS): \
--        QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))
-+        QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$eval(QT.$${i}.MAJOR_VERSION))$$qtPlatformTargetSuffix()
+-        QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))
++        QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix()
      isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
 -        QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
 +        QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt$$QT_MAJOR_VERSION, "Qt ") module
      pclib_replace.match = $$lib_replace.match
      !isEmpty(lib_replace.replace): \
          pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR
-@@ -297,5 +301,3 @@ win32 {
+@@ -314,5 +318,3 @@ win32 {
      # On other platforms, Qt's own compilation goes needs to compile the Qt 5.0 API
      DEFINES *= QT_DISABLE_DEPRECATED_BEFORE=0x050000
  }
 -
 -TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX)  # Do this towards the end
 --
-2.9.3
+2.14.1
 
 
-From e4da2904bcab29d15ad137508390bec0595c0e72 Mon Sep 17 00:00:00 2001
+From d0ccaee377241a6b661ccb9a6d57ebc694b50f76 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 29 Jan 2017 13:02:16 +0100
-Subject: [PATCH 3/5] reenable fontconfig for win32 (MXE-specific)
+Subject: [PATCH 3/6] reenable fontconfig for win32 (MXE-specific)
 
 Change-Id: I05b036366bd402e43309742412bcf8ca91fe125f
 
 diff --git a/src/gui/configure.json b/src/gui/configure.json
-index 1f50116..dd94429 100644
+index dab66fafb4..b90ce6e4d9 100644
 --- a/src/gui/configure.json
 +++ b/src/gui/configure.json
-@@ -471,7 +471,7 @@
+@@ -956,7 +956,7 @@
          },
          "fontconfig": {
              "label": "Fontconfig",
@@ -130,61 +130,37 @@ index 1f50116..dd94429 100644
          },
          "gbm": {
 diff --git a/src/plugins/platforms/minimal/qminimalintegration.cpp b/src/plugins/platforms/minimal/qminimalintegration.cpp
-index 03c7250..7d0ffbd 100644
+index ca33689cd7..194523eee0 100644
 --- a/src/plugins/platforms/minimal/qminimalintegration.cpp
 +++ b/src/plugins/platforms/minimal/qminimalintegration.cpp
-@@ -120,7 +120,11 @@ QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const
-     if (m_options & EnableFonts) {
+@@ -130,7 +130,11 @@ QPlatformFontDatabase *QMinimalIntegration::fontDatabase() const
+ {
+     if (!m_fontDatabase && (m_options & EnableFonts)) {
  #if QT_CONFIG(fontconfig)
-         if (!m_fontDatabase)
 +#ifdef Q_OS_WIN
-+            m_fontDatabase = new QBasicFontDatabase;
++        m_fontDatabase = new QFreeTypeFontDatabase;
 +#else
-             m_fontDatabase = new QGenericUnixFontDatabase;
+         m_fontDatabase = new QGenericUnixFontDatabase;
 +#endif
- #else
-         return QPlatformIntegration::fontDatabase();
- #endif
+ #elif defined(Q_OS_WINRT)
+         m_fontDatabase = new QWinRTFontDatabase;
+ #elif defined(Q_OS_WIN)
 --
-2.9.3
+2.14.1
 
 
-From db3c6f5fecb9b93f3553273576954d363d0630bc Mon Sep 17 00:00:00 2001
-From: Mark Brand <mabrand@mabrand.nl>
-Date: Sun, 29 Jan 2017 14:00:06 +0100
-Subject: [PATCH 4/5] fix included file name case
-
-Change-Id: I026787441aa43128aec001cfe1a7bc8d37799826
-
-diff --git a/src/plugins/platforms/windows/qwin10helpers.cpp b/src/plugins/platforms/windows/qwin10helpers.cpp
-index 977bbfd..12cccd1 100644
---- a/src/plugins/platforms/windows/qwin10helpers.cpp
-+++ b/src/plugins/platforms/windows/qwin10helpers.cpp
-@@ -57,7 +57,7 @@
- #endif
-
- #ifdef HAS_UI_VIEW_SETTINGS_INTEROP
--#  include <UIViewSettingsInterop.h>
-+#  include <uiviewsettingsinterop.h>
- #endif
-
- #ifndef HAS_UI_VIEW_SETTINGS_INTEROP
---
-2.9.3
-
-
-From ddf845adb0080016c2f69fcfa7e23edf70e5151a Mon Sep 17 00:00:00 2001
+From 35e8ce1f490f973045c77385f96acaa3736c8787 Mon Sep 17 00:00:00 2001
 From: Mark Brand <mabrand@mabrand.nl>
 Date: Sun, 29 Jan 2017 16:22:03 +0100
-Subject: [PATCH 5/5] fix treatment of SYBASE_LIBS
+Subject: [PATCH 4/6] fix treatment of SYBASE_LIBS
 
 Change-Id: I4c9914cf7ef9d91feb0718a57f2551c1eeed47e0
 
-diff --git a/src/sql/configure.pri b/src/sql/configure.pri
-index 1d8847b..229b6a1 100644
---- a/src/sql/configure.pri
-+++ b/src/sql/configure.pri
-@@ -76,7 +76,7 @@ defineTest(qtConfLibrary_sybaseEnv) {
+diff --git a/src/plugins/sqldrivers/configure.pri b/src/plugins/sqldrivers/configure.pri
+index b69b51b679..d37423adbd 100644
+--- a/src/plugins/sqldrivers/configure.pri
++++ b/src/plugins/sqldrivers/configure.pri
+@@ -92,7 +92,7 @@ defineTest(qtConfLibrary_sybaseEnv) {
          libs += "-L$${sybase}/lib"
      libs += $$getenv(SYBASE_LIBS)
      !isEmpty(libs) {
@@ -194,4 +170,41 @@ index 1d8847b..229b6a1 100644
      }
      return(true)
 --
-2.9.3
+2.14.1
+
+
+From 8427c411a789c537b41d113d1f8f9ea7eb9d009a Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Thu, 23 Nov 2017 11:28:47 +0200
+Subject: [PATCH 6/6] disable qt_random_cpu for i686-w64-mingw32
+
+Workaround for gcc internal error compiling for mingw32:
+    global/qrandom.cpp: In function 'qsizetype qt_random_cpu(void*, qsizetype)':
+    global/qrandom.cpp:123:1: internal compiler error: in
+    ix86_compute_frame_layout, at config/i386/i386.c:10145
+     }
+     ^
+
+    global/qrandom.cpp:123:1: internal compiler error: Segmentation fault
+    i686-w64-mingw32.static-g++: internal compiler error: Segmentation fault
+    (program cc1plus)
+
+Based on https://codereview.qt-project.org/#/c/212360/
+
+Change-Id: Ia1c902e7b147bdda2b8d7904b40a3b968b8d0369
+
+diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
+index 72ba299280..90a0f378ff 100644
+--- a/src/corelib/global/qrandom.cpp
++++ b/src/corelib/global/qrandom.cpp
+@@ -92,7 +92,7 @@ DECLSPEC_IMPORT BOOLEAN WINAPI SystemFunction036(PVOID RandomBuffer, ULONG Rando
+
+ QT_BEGIN_NAMESPACE
+
+-#if defined(Q_PROCESSOR_X86) && QT_COMPILER_SUPPORTS_HERE(RDRND)
++#if defined(Q_PROCESSOR_X86) && !defined(Q_PROCESSOR_X86_32) && QT_COMPILER_SUPPORTS_HERE(RDRND)
+ static qsizetype qt_random_cpu(void *buffer, qsizetype count) Q_DECL_NOTHROW;
+
+ #  ifdef Q_PROCESSOR_X86_64
+--
+2.14.1
index 9e38573..1758f91 100755 (executable)
@@ -40,16 +40,26 @@ diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platf
 index 66735d8..5731560 100644
 --- a/src/plugins/platforms/windows/qwindowstheme.cpp
 +++ b/src/plugins/platforms/windows/qwindowstheme.cpp
-@@ -338,6 +338,8 @@
+@@ -414,12 +414,16 @@
+ static inline QStringList iconThemeSearchPaths()
+ {
+     const QFileInfo appDir(QCoreApplication::applicationDirPath() + QLatin1String("/icons"));
+-    return appDir.isDir() ? QStringList(appDir.absoluteFilePath()) : QStringList();
++    QStringList ret;
++    ret << appDir.absoluteFilePath() << QCoreApplication::applicationDirPath() + QLatin1String("/../share/icons");
++
++    return ret;
+ }
+
  static inline QStringList styleNames()
  {
-     QStringList result;
-+    result.append(QStringLiteral("breeze"));
-+    result.append(QStringLiteral("oxygen"));
-     if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
-         result.append(QStringLiteral("WindowsVista"));
    if (QSysInfo::WindowsVersion >= QSysInfo::WV_XP)
-@@ -398,6 +400,10 @@
+-    return { QStringLiteral("WindowsVista"), QStringLiteral("Windows") };
++    return {QStringLiteral("breeze"), QStringLiteral("oxygen"),
++            QStringLiteral("WindowsVista"), QStringLiteral("Windows") };
+ }
+
static inline int uiEffects()
+@@ -472,6 +476,10 @@
              result = int(scrollLines);
          return QVariant(result);
      }
diff --git a/patches/qtbase/windowsxp-support-revert-2.patch b/patches/qtbase/windowsxp-support-revert-2.patch
deleted file mode 100755 (executable)
index a24a3e9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-patch -p0 -R -f -l $* < $0
-exit $?
-
---- src/plugins/platforms/windows/qwindowstheme.cpp     2017-06-12 11:35:29.491363130 +0200
-+++ src/plugins/platforms/windows/qwindowstheme.cpp.orig        2017-06-12 11:35:24.223373397 +0200
-@@ -623,7 +623,7 @@
-         memset(&iconInfo, 0, sizeof(iconInfo));
-         iconInfo.cbSize = sizeof(iconInfo);
-         stockFlags |= (pixmapSize.width() > 16 ? SHGFI_LARGEICON : SHGFI_SMALLICON);
--        if (QWindowsContext::shell32dll.sHGetStockIconInfo(stockId, SHGFI_ICON | stockFlags, &iconInfo) == S_OK) {
-+        if (SHGetStockIconInfo(stockId, SHGFI_ICON | stockFlags, &iconInfo) == S_OK) {
-             pixmap = qt_pixmapFromWinHICON(iconInfo.hIcon);
-             DestroyIcon(iconInfo.hIcon);
-             return pixmap;
---- src/plugins/platforms/windows/qwindowswindow.cpp    2017-06-12 11:40:03.530833862 +0200
-+++ src/plugins/platforms/windows/qwindowswindow.cpp.orig   2017-06-12 11:37:38.367113636 +0200
-@@ -1599,7 +1599,8 @@
-
- static inline bool dwmIsCompositionEnabled()
- {
--    return false;
-+    BOOL dWmCompositionEnabled = FALSE;
-+    return SUCCEEDED(DwmIsCompositionEnabled(&dWmCompositionEnabled)) && dWmCompositionEnabled == TRUE;
- }
-
- bool QWindowsWindow::handleWmPaint(HWND hwnd, UINT message,
diff --git a/patches/qtbase/windowsxp-support-revert.patch b/patches/qtbase/windowsxp-support-revert.patch
deleted file mode 100755 (executable)
index d4779a1..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-#! /bin/sh
-patch -p1 -f -l -R $* < $0
-exit $?
-
-commit 5cbc4609906bbd0484344f96643840ffdc723d69
-Author: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
-Date:   Wed Mar 9 09:14:23 2016 +0100
-
-    Windows QPA: Increase API level to 0x600 (Windows Vista).
-
-    - Directly link against dwmapi which should be present on
-      Windows Vista and remove duplicated header constants.
-    - Remove struct QWindowsShell32DL since all required functions
-      are present on Windows Vista.
-    - Remove functions that are no longer needed from QWindowsUser32DLL
-      with exception of the clipboard functions which are not present
-      in the MinGW stub libraries until v5.
-
-    Task-number: QTBUG-51673
-    Change-Id: Ia4a8a3f1db0f0d02322317d547e61ae39f9008b5
-    Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-
-diff --git a/src/plugins/platforms/windows/qwindowsbackingstore.cpp b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
-index df6749ad25..2d5e4071bc 100644
---- a/src/plugins/platforms/windows/qwindowsbackingstore.cpp
-+++ b/src/plugins/platforms/windows/qwindowsbackingstore.cpp
-@@ -100,19 +100,15 @@ void QWindowsBackingStore::flush(QWindow *window, const QRegion &region,
-         POINT ptDst = {r.x(), r.y()};
-         POINT ptSrc = {0, 0};
-         BLENDFUNCTION blend = {AC_SRC_OVER, 0, BYTE(qRound(255.0 * rw->opacity())), AC_SRC_ALPHA};
--        if (QWindowsContext::user32dll.updateLayeredWindowIndirect) {
--            RECT dirty = {dirtyRect.x(), dirtyRect.y(),
--                dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
--            UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA, &dirty};
--            const BOOL result = QWindowsContext::user32dll.updateLayeredWindowIndirect(rw->handle(), &info);
--            if (!result)
--                qErrnoWarning("UpdateLayeredWindowIndirect failed for ptDst=(%d, %d),"
--                              " size=(%dx%d), dirty=(%dx%d %d, %d)", r.x(), r.y(),
--                              r.width(), r.height(), dirtyRect.width(), dirtyRect.height(),
--                              dirtyRect.x(), dirtyRect.y());
--        } else {
--            QWindowsContext::user32dll.updateLayeredWindow(rw->handle(), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA);
--        }
-+        RECT dirty = {dirtyRect.x(), dirtyRect.y(),
-+                      dirtyRect.x() + dirtyRect.width(), dirtyRect.y() + dirtyRect.height()};
-+        UPDATELAYEREDWINDOWINFO info = {sizeof(info), NULL, &ptDst, &size, m_image->hdc(), &ptSrc, 0, &blend, ULW_ALPHA, &dirty};
-+        const BOOL result = UpdateLayeredWindowIndirect(rw->handle(), &info);
-+        if (!result)
-+            qErrnoWarning("UpdateLayeredWindowIndirect failed for ptDst=(%d, %d),"
-+                          " size=(%dx%d), dirty=(%dx%d %d, %d)", r.x(), r.y(),
-+                          r.width(), r.height(), dirtyRect.width(), dirtyRect.height(),
-+                          dirtyRect.x(), dirtyRect.y());
-     } else {
-         const HDC dc = rw->getDC();
-         if (!dc) {
-diff --git a/src/plugins/platforms/windows/qwindowsclipboard.cpp b/src/plugins/platforms/windows/qwindowsclipboard.cpp
-index d527e07308..21bc9d7377 100644
---- a/src/plugins/platforms/windows/qwindowsclipboard.cpp
-+++ b/src/plugins/platforms/windows/qwindowsclipboard.cpp
-@@ -237,8 +237,7 @@ void QWindowsClipboard::propagateClipboardMessage(UINT message, WPARAM wParam, L
-         return;
-     // In rare cases, a clipboard viewer can hang (application crashed,
-     // suspended by a shell prompt 'Select' or debugger).
--    if (QWindowsContext::user32dll.isHungAppWindow
--        && QWindowsContext::user32dll.isHungAppWindow(m_nextClipboardViewer)) {
-+    if (IsHungAppWindow(m_nextClipboardViewer)) {
-         qWarning("Cowardly refusing to send clipboard message to hung application...");
-         return;
-     }
-diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp
-index 74dfa59988..ef0962c2ff 100644
---- a/src/plugins/platforms/windows/qwindowscontext.cpp
-+++ b/src/plugins/platforms/windows/qwindowscontext.cpp
-@@ -97,35 +97,26 @@ int QWindowsContext::verbose = 0;
- #    define LANG_SYRIAC 0x5a
- #endif
-
--static inline bool useRTL_Extensions(QSysInfo::WinVersion ver)
-+static inline bool useRTL_Extensions()
- {
--    if ((ver & QSysInfo::WV_NT_based) && (ver >= QSysInfo::WV_VISTA)) {
--        // 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;
--                }
-+    // 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;
--    } // NT/Vista
--    // Pre-NT: figure out whether a RTL language is installed
--    return IsValidLanguageGroup(LGRPID_ARABIC, LGRPID_INSTALLED)
--                            || IsValidLanguageGroup(LGRPID_HEBREW, LGRPID_INSTALLED)
--                            || IsValidLocale(MAKELCID(MAKELANGID(LANG_ARABIC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
--                            || IsValidLocale(MAKELCID(MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
--                            || IsValidLocale(MAKELCID(MAKELANGID(LANG_SYRIAC, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED)
--                            || IsValidLocale(MAKELCID(MAKELANGID(LANG_FARSI, SUBLANG_DEFAULT), SORT_DEFAULT), LCID_INSTALLED);
-+    }
-+    return false;
- }
-
- #if !defined(QT_NO_SESSIONMANAGER)
-@@ -152,9 +143,7 @@ static inline QWindowsSessionManager *platformSessionManager() {
-     \ingroup qt-lighthouse-win
- */
- QWindowsUser32DLL::QWindowsUser32DLL() :
--    setLayeredWindowAttributes(0), updateLayeredWindow(0),
--    updateLayeredWindowIndirect(0),
--    isHungAppWindow(0), isTouchWindow(0),
-+    isTouchWindow(0),
-     registerTouchWindow(0), unregisterTouchWindow(0),
-     getTouchInputInfo(0), closeTouchInputHandle(0), setProcessDPIAware(0),
-     addClipboardFormatListener(0), removeClipboardFormatListener(0),
-@@ -165,20 +154,11 @@ QWindowsUser32DLL::QWindowsUser32DLL() :
- void QWindowsUser32DLL::init()
- {
-     QSystemLibrary library(QStringLiteral("user32"));
--    // MinGW (g++ 3.4.5) accepts only C casts.
--    setLayeredWindowAttributes = (SetLayeredWindowAttributes)(library.resolve("SetLayeredWindowAttributes"));
--    updateLayeredWindow = (UpdateLayeredWindow)(library.resolve("UpdateLayeredWindow"));
--    if (Q_UNLIKELY(!setLayeredWindowAttributes || !updateLayeredWindow))
--        qFatal("This version of Windows is not supported (User32.dll is missing the symbols 'SetLayeredWindowAttributes', 'UpdateLayeredWindow').");
--
--    updateLayeredWindowIndirect = (UpdateLayeredWindowIndirect)(library.resolve("UpdateLayeredWindowIndirect"));
--    isHungAppWindow = (IsHungAppWindow)library.resolve("IsHungAppWindow");
-     setProcessDPIAware = (SetProcessDPIAware)library.resolve("SetProcessDPIAware");
-
--    if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA) {
--        addClipboardFormatListener = (AddClipboardFormatListener)library.resolve("AddClipboardFormatListener");
--        removeClipboardFormatListener = (RemoveClipboardFormatListener)library.resolve("RemoveClipboardFormatListener");
--    }
-+    addClipboardFormatListener = (AddClipboardFormatListener)library.resolve("AddClipboardFormatListener");
-+    removeClipboardFormatListener = (RemoveClipboardFormatListener)library.resolve("RemoveClipboardFormatListener");
-+
-     getDisplayAutoRotationPreferences = (GetDisplayAutoRotationPreferences)library.resolve("GetDisplayAutoRotationPreferences");
-     setDisplayAutoRotationPreferences = (SetDisplayAutoRotationPreferences)library.resolve("SetDisplayAutoRotationPreferences");
- }
-@@ -196,38 +176,6 @@ bool QWindowsUser32DLL::initTouch()
-     return isTouchWindow && registerTouchWindow && unregisterTouchWindow && getTouchInputInfo && closeTouchInputHandle;
- }
-
--/*!
--    \class QWindowsShell32DLL
--    \brief Struct that contains dynamically resolved symbols of Shell32.dll.
--
--    The stub libraries shipped with the MinGW compiler miss some of the
--    functions. They need to be retrieved dynamically.
--
--    \sa QWindowsUser32DLL
--
--    \internal
--    \ingroup qt-lighthouse-win
--*/
--
--QWindowsShell32DLL::QWindowsShell32DLL()
--    : sHCreateItemFromParsingName(0)
--    , sHGetKnownFolderIDList(0)
--    , sHGetStockIconInfo(0)
--    , sHGetImageList(0)
--    , sHCreateItemFromIDList(0)
--{
--}
--
--void QWindowsShell32DLL::init()
--{
--    QSystemLibrary library(QStringLiteral("shell32"));
--    sHCreateItemFromParsingName = (SHCreateItemFromParsingName)(library.resolve("SHCreateItemFromParsingName"));
--    sHGetKnownFolderIDList = (SHGetKnownFolderIDList)(library.resolve("SHGetKnownFolderIDList"));
--    sHGetStockIconInfo = (SHGetStockIconInfo)library.resolve("SHGetStockIconInfo");
--    sHGetImageList = (SHGetImageList)library.resolve("SHGetImageList");
--    sHCreateItemFromIDList = (SHCreateItemFromIDList)library.resolve("SHCreateItemFromIDList");
--}
--
- QWindowsShcoreDLL::QWindowsShcoreDLL()
-     : getProcessDpiAwareness(0)
-     , setProcessDpiAwareness(0)
-@@ -246,7 +194,6 @@ void QWindowsShcoreDLL::init()
- }
-
- QWindowsUser32DLL QWindowsContext::user32dll;
--QWindowsShell32DLL QWindowsContext::shell32dll;
- QWindowsShcoreDLL QWindowsContext::shcoredll;
-
- QWindowsContext *QWindowsContext::m_instance = 0;
-@@ -292,16 +239,14 @@ QWindowsContextPrivate::QWindowsContextPrivate()
-     , m_eventType(QByteArrayLiteral("windows_generic_MSG"))
-     , m_lastActiveWindow(0), m_asyncExpose(0)
- {
--    const QSysInfo::WinVersion ver = QSysInfo::windowsVersion();
-     QWindowsContext::user32dll.init();
--    QWindowsContext::shell32dll.init();
-     QWindowsContext::shcoredll.init();
-
-     if (m_mouseHandler.touchDevice() && QWindowsContext::user32dll.initTouch())
-         m_systemInfo |= QWindowsContext::SI_SupportsTouch;
-     m_displayContext = GetDC(0);
-     m_defaultDPI = GetDeviceCaps(m_displayContext, LOGPIXELSY);
--    if (useRTL_Extensions(ver)) {
-+    if (useRTL_Extensions()) {
-         m_systemInfo |= QWindowsContext::SI_RTL_Extensions;
-         m_keyMapper.setUseRTLExtensions(true);
-     }
-diff --git a/src/plugins/platforms/windows/qwindowscontext.h b/src/plugins/platforms/windows/qwindowscontext.h
-index df07f433ec..32d7800ef5 100644
---- a/src/plugins/platforms/windows/qwindowscontext.h
-+++ b/src/plugins/platforms/windows/qwindowscontext.h
-@@ -85,31 +85,17 @@ struct QWindowsUser32DLL
-     inline void init();
-     inline bool initTouch();
-
--    typedef BOOL (WINAPI *IsTouchWindow)(HWND, PULONG);
-+    typedef BOOL (WINAPI *IsTouchWindow)(HWND, PULONG); // Windows 7
-     typedef BOOL (WINAPI *RegisterTouchWindow)(HWND, ULONG);
-     typedef BOOL (WINAPI *UnregisterTouchWindow)(HWND);
-     typedef BOOL (WINAPI *GetTouchInputInfo)(HANDLE, UINT, PVOID, int);
-     typedef BOOL (WINAPI *CloseTouchInputHandle)(HANDLE);
--    typedef BOOL (WINAPI *SetLayeredWindowAttributes)(HWND, COLORREF, BYTE, DWORD);
--    typedef BOOL (WINAPI *UpdateLayeredWindow)(HWND, HDC , const POINT *,
--                 const SIZE *, HDC, const POINT *, COLORREF,
--                 const BLENDFUNCTION *, DWORD);
--    typedef BOOL (WINAPI *UpdateLayeredWindowIndirect)(HWND, const UPDATELAYEREDWINDOWINFO *);
--    typedef BOOL (WINAPI *IsHungAppWindow)(HWND);
-     typedef BOOL (WINAPI *SetProcessDPIAware)();
-     typedef BOOL (WINAPI *AddClipboardFormatListener)(HWND);
-     typedef BOOL (WINAPI *RemoveClipboardFormatListener)(HWND);
-     typedef BOOL (WINAPI *GetDisplayAutoRotationPreferences)(DWORD *);
-     typedef BOOL (WINAPI *SetDisplayAutoRotationPreferences)(DWORD);
-
--    // Functions missing in Q_CC_GNU stub libraries.
--    SetLayeredWindowAttributes setLayeredWindowAttributes;
--    UpdateLayeredWindow updateLayeredWindow;
--
--    // Functions missing in older versions of Windows
--    UpdateLayeredWindowIndirect updateLayeredWindowIndirect;
--    IsHungAppWindow isHungAppWindow;
--
-     // Touch functions from Windows 7 onwards (also for use with Q_CC_MSVC).
-     IsTouchWindow isTouchWindow;
-     RegisterTouchWindow registerTouchWindow;
-@@ -120,7 +106,8 @@ struct QWindowsUser32DLL
-     // Windows Vista onwards
-     SetProcessDPIAware setProcessDPIAware;
-
--    // Clipboard listeners, Windows Vista onwards
-+    // Clipboard listeners are present on Windows Vista onwards
-+    // but missing in MinGW 4.9 stub libs. Can be removed in MinGW 5.
-     AddClipboardFormatListener addClipboardFormatListener;
-     RemoveClipboardFormatListener removeClipboardFormatListener;
-
-@@ -129,24 +116,6 @@ struct QWindowsUser32DLL
-     SetDisplayAutoRotationPreferences setDisplayAutoRotationPreferences;
- };
-
--struct QWindowsShell32DLL
--{
--    QWindowsShell32DLL();
--    inline void init();
--
--    typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
--    typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
--    typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
--    typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
--    typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
--
--    SHCreateItemFromParsingName sHCreateItemFromParsingName;
--    SHGetKnownFolderIDList sHGetKnownFolderIDList;
--    SHGetStockIconInfo sHGetStockIconInfo;
--    SHGetImageList sHGetImageList;
--    SHCreateItemFromIDList sHCreateItemFromIDList;
--};
--
- // Shell scaling library (Windows 8.1 onwards)
- struct QWindowsShcoreDLL {
-     QWindowsShcoreDLL();
-@@ -235,7 +204,6 @@ public:
-     QWindowsTabletSupport *tabletSupport() const;
-
-     static QWindowsUser32DLL user32dll;
--    static QWindowsShell32DLL shell32dll;
-     static QWindowsShcoreDLL shcoredll;
-
-     static QByteArray comErrorString(HRESULT hr);
-diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
-index f2beeb6f54..e1b0d36922 100644
---- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
-+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
-@@ -988,22 +988,18 @@ void QWindowsNativeFileDialogBase::setWindowTitle(const QString &title)
- IShellItem *QWindowsNativeFileDialogBase::shellItem(const QUrl &url)
- {
-     if (url.isLocalFile()) {
--        if (!QWindowsContext::shell32dll.sHCreateItemFromParsingName)
--            return Q_NULLPTR;
-         IShellItem *result = Q_NULLPTR;
-         const QString native = QDir::toNativeSeparators(url.toLocalFile());
-         const HRESULT hr =
--                QWindowsContext::shell32dll.sHCreateItemFromParsingName(reinterpret_cast<const wchar_t *>(native.utf16()),
--                                                                        NULL, IID_IShellItem,
--                                                                        reinterpret_cast<void **>(&result));
-+                SHCreateItemFromParsingName(reinterpret_cast<const wchar_t *>(native.utf16()),
-+                                            NULL, IID_IShellItem,
-+                                            reinterpret_cast<void **>(&result));
-         if (FAILED(hr)) {
-             qErrnoWarning("%s: SHCreateItemFromParsingName(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
-             return Q_NULLPTR;
-         }
-         return result;
-     } else if (url.scheme() == QLatin1String("clsid")) {
--        if (!QWindowsContext::shell32dll.sHGetKnownFolderIDList || !QWindowsContext::shell32dll.sHCreateItemFromIDList)
--            return Q_NULLPTR;
-         // Support for virtual folders via GUID
-         // (see https://msdn.microsoft.com/en-us/library/windows/desktop/dd378457(v=vs.85).aspx)
-         // specified as "clsid:<GUID>" (without '{', '}').
-@@ -1014,12 +1010,12 @@ IShellItem *QWindowsNativeFileDialogBase::shellItem(const QUrl &url)
-             return Q_NULLPTR;
-         }
-         PIDLIST_ABSOLUTE idList;
--        HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
-+        HRESULT hr = SHGetKnownFolderIDList(uuid, 0, 0, &idList);
-         if (FAILED(hr)) {
-             qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
-             return Q_NULLPTR;
-         }
--        hr = QWindowsContext::shell32dll.sHCreateItemFromIDList(idList, IID_IShellItem, reinterpret_cast<void **>(&result));
-+        hr = SHCreateItemFromIDList(idList, IID_IShellItem, reinterpret_cast<void **>(&result));
-         CoTaskMemFree(idList);
-         if (FAILED(hr)) {
-             qErrnoWarning("%s: SHCreateItemFromIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
-diff --git a/src/plugins/platforms/windows/qwindowstheme.cpp b/src/plugins/platforms/windows/qwindowstheme.cpp
-index f33267e5e3..046c32a80a 100644
---- a/src/plugins/platforms/windows/qwindowstheme.cpp
-+++ b/src/plugins/platforms/windows/qwindowstheme.cpp
-@@ -490,7 +490,7 @@ QPixmap QWindowsTheme::standardPixmap(StandardPixmap sp, const QSizeF &size) con
-     const int scaleFactor = primaryScreen ? qRound(QHighDpiScaling::factor(primaryScreen)) : 1;
-     const QSizeF pixmapSize = size * scaleFactor;
-     int resourceId = -1;
--    int stockId = SIID_INVALID;
-+    SHSTOCKICONID stockId = SIID_INVALID;
-     UINT stockFlags = 0;
-     LPCTSTR iconName = 0;
-     switch (sp) {
-@@ -669,14 +665,8 @@ static QPixmap pixmapFromShellImageList(int iImageList, const SHFILEINFO &info)
-     // For MinGW:
-     static const IID iID_IImageList = {0x46eb5926, 0x582e, 0x4017, {0x9f, 0xdf, 0xe8, 0x99, 0x8d, 0xaa, 0x9, 0x50}};
-
--    if (!QWindowsContext::shell32dll.sHGetImageList)
--        return result;
--    if (iImageList == sHIL_JUMBO && QSysInfo::WindowsVersion < QSysInfo::WV_VISTA)
--        return result;
--
-     IImageList *imageList = 0;
--    HRESULT hr = QWindowsContext::shell32dll.sHGetImageList(iImageList, iID_IImageList,
--                                                            reinterpret_cast<void **>(&imageList));
-+    HRESULT hr = SHGetImageList(iImageList, iID_IImageList, reinterpret_cast<void **>(&imageList));
-     if (hr != S_OK)
-         return result;
-     HICON hIcon;
-diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
-index a60ab5a2ab..c369bafafc 100644
---- a/src/plugins/platforms/windows/qwindowswindow.cpp
-+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
-@@ -62,6 +62,8 @@
-
- #include <QtCore/QDebug>
-
-+#include <dwmapi.h>
-+
- QT_BEGIN_NAMESPACE
-
- enum {
-@@ -258,55 +260,22 @@ static inline bool windowIsOpenGL(const QWindow *w)
-
- static bool applyBlurBehindWindow(HWND hwnd)
- {
--    enum { dwmBbEnable = 0x1, dwmBbBlurRegion = 0x2 };
--
--    struct DwmBlurBehind {
--        DWORD dwFlags;
--        BOOL  fEnable;
--        HRGN  hRgnBlur;
--        BOOL  fTransitionOnMaximized;
--    };
--
--    typedef HRESULT (WINAPI *PtrDwmEnableBlurBehindWindow)(HWND, const DwmBlurBehind*);
--    typedef HRESULT (WINAPI *PtrDwmIsCompositionEnabled)(BOOL *);
--
--    // DWM API is available only from Windows Vista
--    if (QSysInfo::windowsVersion() < QSysInfo::WV_VISTA)
--        return false;
--
--    static bool functionPointersResolved = false;
--    static PtrDwmEnableBlurBehindWindow dwmBlurBehind = 0;
--    static PtrDwmIsCompositionEnabled dwmIsCompositionEnabled = 0;
--
--    if (Q_UNLIKELY(!functionPointersResolved)) {
--        QSystemLibrary library(QStringLiteral("dwmapi"));
--        if (library.load()) {
--            dwmBlurBehind = (PtrDwmEnableBlurBehindWindow)(library.resolve("DwmEnableBlurBehindWindow"));
--            dwmIsCompositionEnabled = (PtrDwmIsCompositionEnabled)(library.resolve("DwmIsCompositionEnabled"));
--        }
--
--        functionPointersResolved = true;
--    }
--
--    if (Q_UNLIKELY(!dwmBlurBehind || !dwmIsCompositionEnabled))
--        return false;
--
-     BOOL compositionEnabled;
--    if (dwmIsCompositionEnabled(&compositionEnabled) != S_OK)
-+    if (DwmIsCompositionEnabled(&compositionEnabled) != S_OK)
-         return false;
-
--    DwmBlurBehind blurBehind = {0, 0, 0, 0};
-+    DWM_BLURBEHIND blurBehind = {0, 0, 0, 0};
-
-     if (compositionEnabled) {
--        blurBehind.dwFlags = dwmBbEnable | dwmBbBlurRegion;
-+        blurBehind.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION;
-         blurBehind.fEnable = TRUE;
-         blurBehind.hRgnBlur = CreateRectRgn(0, 0, -1, -1);
-     } else {
--        blurBehind.dwFlags = dwmBbEnable;
-+        blurBehind.dwFlags = DWM_BB_ENABLE;
-         blurBehind.fEnable = FALSE;
-     }
-
--    const bool result = dwmBlurBehind(hwnd, &blurBehind) == S_OK;
-+    const bool result = DwmEnableBlurBehindWindow(hwnd, &blurBehind) == S_OK;
-
-     if (blurBehind.hRgnBlur)
-         DeleteObject(blurBehind.hRgnBlur);
-@@ -351,9 +320,9 @@ static void setWindowOpacity(HWND hwnd, Qt::WindowFlags flags, bool hasAlpha, bo
-         if (hasAlpha && !openGL && (flags & Qt::FramelessWindowHint)) {
-             // Non-GL windows with alpha: Use blend function to update.
-             BLENDFUNCTION blend = {AC_SRC_OVER, 0, alpha, AC_SRC_ALPHA};
--            QWindowsContext::user32dll.updateLayeredWindow(hwnd, NULL, NULL, NULL, NULL, NULL, 0, &blend, ULW_ALPHA);
-+            UpdateLayeredWindow(hwnd, NULL, NULL, NULL, NULL, NULL, 0, &blend, ULW_ALPHA);
-         } else {
--            QWindowsContext::user32dll.setLayeredWindowAttributes(hwnd, 0, alpha, LWA_ALPHA);
-+            SetLayeredWindowAttributes(hwnd, 0, alpha, LWA_ALPHA);
-         }
-     } else if (IsWindowVisible(hwnd)) { // Repaint when switching from layered.
-         InvalidateRect(hwnd, NULL, TRUE);
-diff --git a/src/plugins/platforms/windows/windows.pro b/src/plugins/platforms/windows/windows.pro
-index aef9f5330c..adafa830d5 100644
---- a/src/plugins/platforms/windows/windows.pro
-+++ b/src/plugins/platforms/windows/windows.pro
-@@ -4,7 +4,7 @@ QT *= core-private
- QT *= gui-private
- QT *= platformsupport-private
-
--LIBS += -lgdi32
-+LIBS += -lgdi32 -ldwmapi
-
- include(windows.pri)
diff --git a/patches/qtbase/windowsxp-support.patch b/patches/qtbase/windowsxp-support.patch
deleted file mode 100755 (executable)
index dcfbed4..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-#! /bin/sh
-patch -p1 -f -l $* < $0
-exit $?
-
-diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
-index e12da68671..c9d2a4b80f 100644
---- a/src/corelib/io/qsettings.cpp
-+++ b/src/corelib/io/qsettings.cpp
-@@ -54,6 +54,8 @@
- #include "qstandardpaths.h"
- #include <qdatastream.h>
-
-+#include <private/qsystemlibrary_p.h>
-+
- #ifndef QT_NO_TEXTCODEC
- #  include "qtextcodec.h"
- #endif
-@@ -951,15 +953,34 @@ void QConfFileSettingsPrivate::initAccess()
- }
-
- #if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
--static QString windowsConfigPath(const KNOWNFOLDERID &type)
-+static QString convertCharArray(const wchar_t *path)
-+{
-+    return QDir::fromNativeSeparators(QString::fromWCharArray(path));
-+}
-+
-+// Convenience for SHGetKnownFolderPath().
-+static QString sHGetKnownFolderPath(const GUID &clsid)
- {
-     QString result;
-+    typedef HRESULT (WINAPI *GetKnownFolderPath)(const GUID&, DWORD, HANDLE, LPWSTR*);
-
--    PWSTR path = nullptr;
--    if (SHGetKnownFolderPath(type, KF_FLAG_DONT_VERIFY, NULL, &path) == S_OK) {
--        result = QString::fromWCharArray(path);
-+    static const GetKnownFolderPath sHGetKnownFolderPath = // Vista onwards.
-+        reinterpret_cast<GetKnownFolderPath>(QSystemLibrary::resolve(QLatin1String("shell32"), "SHGetKnownFolderPath"));
-+
-+    LPWSTR path;
-+    if (Q_LIKELY(sHGetKnownFolderPath && SUCCEEDED(sHGetKnownFolderPath(clsid, KF_FLAG_DONT_VERIFY, 0, &path)))) {
-+        result = convertCharArray(path);
-         CoTaskMemFree(path);
-     }
-+    return result;
-+}
-+
-+static QString windowsConfigPath(const KNOWNFOLDERID &type)
-+{
-+    QString result;
-+
-+    PWSTR path = nullptr;
-+    result = sHGetKnownFolderPath(type);
-
-     if (result.isEmpty()) {
-         if (type == FOLDERID_ProgramData) {
-diff --git a/src/plugins/platforms/windows/qwin10helpers.cpp b/src/plugins/platforms/windows/qwin10helpers.cpp
-index 12cccd124b..fe444c9420 100644
---- a/src/plugins/platforms/windows/qwin10helpers.cpp
-+++ b/src/plugins/platforms/windows/qwin10helpers.cpp
-@@ -42,10 +42,10 @@
- #include <QtCore/QDebug>
- #include <QtCore/private/qsystemlibrary_p.h>
-
--#if defined(Q_CC_MINGW)
-+#if 0
- #  define HAS_UI_VIEW_SETTINGS_INTEROP
- // Present from MSVC2015 + SDK 10 onwards
--#elif (!defined(Q_CC_MSVC) || _MSC_VER >= 1900) && NTDDI_VERSION >= 0xa000000
-+#elif 0
- #  define HAS_UI_VIEW_SETTINGS_INTEROP
- #  define HAS_UI_VIEW_SETTINGS
- #endif