summaryrefslogtreecommitdiffstats
path: root/src/qtbase-1-cherrypicks.patch
blob: f9d2de6f7e22a4a53484b257c859d2bf21957256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
This file is part of MXE.
See index.html for further information.

Contains ad hoc patches for cross building.

From 4274f3853fb812a168965a5addfb5413d06eef05 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Tue, 26 Feb 2013 13:23:33 +0100
Subject: [PATCH 1/6] use pkg-config for freetype

Change-Id: Id2f78ed9dbdcacd570eb25982cbd700d0437542a

diff --git a/src/platformsupport/fontdatabases/basic/basic.pri b/src/platformsupport/fontdatabases/basic/basic.pri
index 88be809..8fc19d2 100644
--- a/src/platformsupport/fontdatabases/basic/basic.pri
+++ b/src/platformsupport/fontdatabases/basic/basic.pri
@@ -82,5 +82,7 @@ contains(QT_CONFIG, freetype) {
 } else:contains(QT_CONFIG, system-freetype) {
     # pull in the proper freetype2 include directory
     include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
+    CONFIG += link_pkgconfig
+    PKGCONFIG += freetype2
 }
 
-- 
1.8.1.4


From e73795bab32ae951f673be654d44e4b69d731998 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 22 Dec 2012 17:45:34 +0100
Subject: [PATCH 2/6] WIP: qmake writeFile(): work around concurrent
 QDir::mkpath() failure

This actually happened when building qtimageformats with make -j4.
Failure in mkspecs/features/qt_plugin.prf:
    write_file($$MODULE_PRI, MODULE_PRI_CONT)|error("Aborting.") with make -j4.

Change-Id: Ibc685f613d721e178e6aff408905d77b0ce1740a

diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp
index be0d8ea..6306235 100644
--- a/qmake/library/qmakebuiltins.cpp
+++ b/qmake/library/qmakebuiltins.cpp
@@ -310,9 +310,17 @@ QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::Open
 {
     QFileInfo qfi(fn);
     if (!QDir::current().mkpath(qfi.path())) {
-        evalError(fL1S("Cannot create %1directory %2.")
-                  .arg(ctx, QDir::toNativeSeparators(qfi.path())));
-        return ReturnFalse;
+        // could have failed due to concurrent mkpath attempt
+#ifdef Q_OS_WIN
+       Sleep(1000);
+#else
+       sleep(1);
+#endif
+        if (!qfi.dir().exists()) {
+            evalError(fL1S("Cannot create %1directory %2.")
+                      .arg(ctx, QDir::toNativeSeparators(qfi.path())));
+            return ReturnFalse;
+        }
     }
     QString errStr;
     if (!doWriteFile(qfi.filePath(), mode, contents, &errStr)) {
-- 
1.8.1.4


From dbb51e399120e7c4023e8ac760d971050ff43f33 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 18 May 2013 23:07:46 +0200
Subject: [PATCH 3/6] use pkgconfig for icu detection (MXE specific)

Change-Id: I874171361fec812cb5a5a56e4d8d90a630be3bf3

diff --git a/config.tests/unix/icu/icu.pro b/config.tests/unix/icu/icu.pro
index 8e58334..1d66c16 100644
--- a/config.tests/unix/icu/icu.pro
+++ b/config.tests/unix/icu/icu.pro
@@ -1,4 +1,4 @@
 SOURCES = icu.cpp
 CONFIG -= qt dylib app_bundle
-unix:LIBS += -licuuc -licui18n
-win32:LIBS += -licuin
+CONFIG += link_pkgconfig
+PKGCONFIG += icu-i18n
-- 
1.8.1.4


From ebb2503ccdcd9ab24216444b312d079b2c9cb298 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 19 Sep 2013 08:53:30 +0200
Subject: [PATCH 4/6] fix off-by-one error in NTLM proxy authentication

Change-Id: Icee3fc939d81c726f8e4ed484a0c8685cf1f271c
Task-number: QTBUG-27555
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c97e369e70c9b17b3ac00f43ccdc191df2183da1)

diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 73991ab..0ea97f2 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -1392,7 +1392,7 @@ static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch)
     ds >> ch.targetInfo;
 
     if (ch.targetName.len > 0) {
-        if (ch.targetName.len + ch.targetName.offset >= (unsigned)data.size())
+        if (ch.targetName.len + ch.targetName.offset > (unsigned)data.size())
             return false;
 
         ch.targetNameStr = qStringFromUcs2Le(data.mid(ch.targetName.offset, ch.targetName.len));
-- 
1.8.1.4


From 8966a716ba09eba506c6d75201d86e5f3c51ff56 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sat, 19 Oct 2013 22:12:13 +1100
Subject: [PATCH 5/6] Fix FTBFS against latest mingw-w64

https://codereview.qt-project.org/#change,63747
0001-Windows-Fix-compilation-with-MinGW-64-gcc-4.8.1.patch
taken from https://aur.archlinux.org/packages/mi/mingw-w64-qt5-base

diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp
index e8904b0..57231b5 100644
--- a/src/corelib/io/qfilesystemengine_win.cpp
+++ b/src/corelib/io/qfilesystemengine_win.cpp
@@ -573,9 +573,12 @@ typedef enum { Q_FileIdInfo = 18 } Q_FILE_INFO_BY_HANDLE_CLASS;
 
 #  if defined(Q_CC_MINGW) || (defined(Q_CC_MSVC) && _MSC_VER < 1700)
 
+// MinGW-64 defines FILE_ID_128 as of gcc-4.8.1 along with FILE_SUPPORTS_INTEGRITY_STREAMS
+#    if !(defined(Q_CC_MINGW) && defined(FILE_SUPPORTS_INTEGRITY_STREAMS))
 typedef struct _FILE_ID_128 {
     BYTE  Identifier[16];
 } FILE_ID_128, *PFILE_ID_128;
+#    endif // !(Q_CC_MINGW && FILE_SUPPORTS_INTEGRITY_STREAMS)
 
 typedef struct _FILE_ID_INFO {
     ULONGLONG VolumeSerialNumber;
@@ -614,7 +617,8 @@ QByteArray fileIdWin8(HANDLE handle)
                                          &infoEx, sizeof(FILE_ID_INFO))) {
             result = QByteArray::number(infoEx.VolumeSerialNumber, 16);
             result += ':';
-            result += QByteArray((char *)infoEx.FileId.Identifier, sizeof(infoEx.FileId.Identifier)).toHex();
+            // Note: MinGW-64's definition of FILE_ID_128 differs from the MSVC one.
+            result += QByteArray((char *)&infoEx.FileId, sizeof(infoEx.FileId)).toHex();
         }
     }
     return result;
-- 
1.8.1.4


From 2252f72f676c6cd4562f294561603e30661600b3 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sat, 19 Oct 2013 22:16:50 +1100
Subject: [PATCH 6/6] Fix IEnumShellItems defined when
 __IShellEnumItems_INTERFACE_DEFINED__ not defined

mingw-w64 FTBFS fix
qt5-mingw-w64-trunk-compatibility.patch
from https://aur.archlinux.org/packages/mi/mingw-w64-qt5-base/PKGBUILD

diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index 33bed61..299de76 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -39,6 +39,9 @@
 **
 ****************************************************************************/
 
+/* The structure FDAP which is used in this file is only available as of Windows Vista */
+#define _WIN32_WINNT 0x0600
+
 #include "qwindowsdialoghelpers.h"
 
 #include "qwindowscontext.h"
@@ -232,7 +235,7 @@ DECLARE_INTERFACE_(IShellItemFilter, IUnknown)
 };
 #endif
 
-#ifndef __IShellEnumItems_INTERFACE_DEFINED__
+#if !defined(__IShellEnumItems_INTERFACE_DEFINED__) && !defined(__IEnumShellItems_INTERFACE_DEFINED__)
 DECLARE_INTERFACE_(IEnumShellItems, IUnknown)
 {
     STDMETHOD(Next)(THIS_ ULONG celt, IShellItem **rgelt, ULONG *pceltFetched) PURE;
@@ -1710,7 +1713,9 @@ static int CALLBACK xpFileDialogGetExistingDirCallbackProc(HWND hwnd, UINT uMsg,
     return dialog->existingDirCallback(hwnd, uMsg, lParam);
 }
 
-#ifdef Q_CC_MINGW
+/* 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) && __MINGW64_VERSION_MAJOR < 3
 typedef ITEMIDLIST *qt_LpItemIdList;
 #else
 typedef PIDLIST_ABSOLUTE qt_LpItemIdList;
-- 
1.8.1.4