[Gpg4win-commits] [git] Gpg4win - branch, master, updated. gpg4win-2.3.1-255-g472d7bc

by Andre Heinecke cvs at cvs.gnupg.org
Fri Jun 9 16:41:57 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG for Windows".

The branch, master has been updated
       via  472d7bcc03641bbe0191e81bad534ab6adf0db23 (commit)
      from  29507a1f6e76cc7cc5d8e613984db84cefbbfe79 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 472d7bcc03641bbe0191e81bad534ab6adf0db23
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Fri Jun 9 16:40:24 2017 +0200

    Fix Qt Windows XP Support, hopefully.
    
    * patches/qtbase/windowsxp-support.patch: New.
    * Makfile.am (EXTRA_DIST): Add patch.

diff --git a/Makefile.am b/Makefile.am
index 224df93..989d96d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,6 +32,7 @@ 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/qtwinextras/support-xp.patch \
         patches/w32pth-2.0.5/workaround-broken-libtool.patch \
         patches/qttools/disable-most-tools.patch \
diff --git a/patches/qtbase/windowsxp-support.patch b/patches/qtbase/windowsxp-support.patch
new file mode 100755
index 0000000..cf853ad
--- /dev/null
+++ b/patches/qtbase/windowsxp-support.patch
@@ -0,0 +1,56 @@
+#! /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) {

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                            |  1 +
 patches/qtbase/windowsxp-support.patch | 56 ++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100755 patches/qtbase/windowsxp-support.patch


hooks/post-receive
-- 
GnuPG for Windows
http://git.gnupg.org



More information about the Gpg4win-commits mailing list