diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qtdeclarative-1-fixes.patch | 65 | ||||
-rw-r--r-- | src/qtdeclarative.mk | 2 |
2 files changed, 65 insertions, 2 deletions
diff --git a/src/qtdeclarative-1-fixes.patch b/src/qtdeclarative-1-fixes.patch new file mode 100644 index 0000000..9ec5a73 --- /dev/null +++ b/src/qtdeclarative-1-fixes.patch @@ -0,0 +1,65 @@ +This file is part of MXE. +See index.html for further information. + +This patch has been taken from: +https://github.com/qtproject/qtdeclarative/commit/156bb6ed1aafe96a1d5ea85e3ad8445d6e785bcb + +From 156bb6ed1aafe96a1d5ea85e3ad8445d6e785bcb Mon Sep 17 00:00:00 2001 +From: Konstantin Ritt <ritt.ks@gmail.com> +Date: Wed, 26 Mar 2014 20:29:29 +0200 +Subject: [PATCH] Fix build on older MinGW + +The correct declaration of the SHGetPathFromIDList symbol is +being used in mingw-w64 as of r6215, which is a v3 snapshot; +until then, SHGetPathFromIDList was declared to use LPITEMIDLIST. + +Change-Id: Icc2f7814bad475c9b825f7d70c0ae4da72f471d9 +Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> +Reviewed-by: Kai Koehne <kai.koehne@digia.com> +Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> +--- + src/qml/qml/qqmlengine.cpp | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp +index d927a8c..d378d77 100644 +--- a/src/qml/qml/qqmlengine.cpp ++++ b/src/qml/qml/qqmlengine.cpp +@@ -109,7 +109,9 @@ + #include <qlibrary.h> + #include <windows.h> + +-#define CSIDL_APPDATA 0x001a // <username>\Application Data ++#ifndef CSIDL_APPDATA ++# define CSIDL_APPDATA 0x001a // <username>\Application Data ++#endif + #endif + + Q_DECLARE_METATYPE(QQmlProperty) +@@ -2302,12 +2304,23 @@ static inline QString shellNormalizeFileName(const QString &name) + { + const QString nativeSeparatorName(QDir::toNativeSeparators(name)); + const LPCTSTR nameC = reinterpret_cast<LPCTSTR>(nativeSeparatorName.utf16()); ++// The correct declaration of the SHGetPathFromIDList symbol is ++// being used in mingw-w64 as of r6215, which is a v3 snapshot. ++#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3) ++ ITEMIDLIST file; ++ if (FAILED(SHParseDisplayName(nameC, NULL, &file, 0, NULL))) ++ return name; ++ TCHAR buffer[MAX_PATH]; ++ if (!SHGetPathFromIDList(&file, buffer)) ++ return name; ++#else + PIDLIST_ABSOLUTE file; + if (FAILED(SHParseDisplayName(nameC, NULL, &file, 0, NULL))) + return name; + TCHAR buffer[MAX_PATH]; + if (!SHGetPathFromIDList(file, buffer)) + return name; ++#endif + QString canonicalName = QString::fromWCharArray(buffer); + // Upper case drive letter + if (canonicalName.size() > 2 && canonicalName.at(1) == QLatin1Char(':')) +-- +1.9.1 + diff --git a/src/qtdeclarative.mk b/src/qtdeclarative.mk index f3bdfd0..5290ee2 100644 --- a/src/qtdeclarative.mk +++ b/src/qtdeclarative.mk @@ -19,5 +19,3 @@ define $(PKG)_BUILD $(MAKE) -C '$(1)' -j '$(JOBS)' $(MAKE) -C '$(1)' -j 1 install endef - -$(PKG)_BUILD_i686-pc-mingw32 = |