1 |
commit: 1cc27193d3c0f467f208f0b876b3894ab3c7d9bc |
2 |
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 7 20:46:38 2014 +0000 |
4 |
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 7 20:46:38 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=1cc27193 |
7 |
|
8 |
[dev-qt/qtcore:4] Sync with portage. |
9 |
|
10 |
Package-Manager: portage-2.2.10 |
11 |
|
12 |
--- |
13 |
...ExcludeSocketNotifiers-in-glib-event-loop.patch | 81 +++++++++++++++++++ |
14 |
...h => qtcore-4.8.5-moc-boost-lexical-cast.patch} | 0 |
15 |
.../qtcore-4.8.5-qeventdispatcher-recursive.patch | 94 ++++++++++++++++++++++ |
16 |
dev-qt/qtcore/qtcore-4.8.6.ebuild | 4 +- |
17 |
dev-qt/qtcore/qtcore-4.8.9999.ebuild | 4 +- |
18 |
5 files changed, 181 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch |
21 |
new file mode 100644 |
22 |
index 0000000..0fcc1fa |
23 |
--- /dev/null |
24 |
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch |
25 |
@@ -0,0 +1,81 @@ |
26 |
+From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001 |
27 |
+From: Jan-Marek Glogowski <glogow@×××××××.de> |
28 |
+Date: Thu, 6 Mar 2014 18:44:43 +0100 |
29 |
+Subject: Honor ExcludeSocketNotifiers in glib event loop |
30 |
+ |
31 |
+Implements QEventLoop::ExcludeSocketNotifiers in the same way |
32 |
+QEventLoop::X11ExcludeTimers is already implemented for the glib |
33 |
+event loop. |
34 |
+ |
35 |
+This prevents crashes when QClipboard checks for clipboard events |
36 |
+and |
37 |
+ qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true ); |
38 |
+is set. |
39 |
+ |
40 |
+Task-number: QTBUG-34614 |
41 |
+Task-number: QTBUG-37380 |
42 |
+ |
43 |
+Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d |
44 |
+--- |
45 |
+ src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++ |
46 |
+ 1 file changed, 10 insertions(+) |
47 |
+ |
48 |
+diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp |
49 |
+index 0b0e308..ba522fa 100644 |
50 |
+--- a/src/corelib/kernel/qeventdispatcher_glib.cpp |
51 |
++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp |
52 |
+@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier |
53 |
+ struct GSocketNotifierSource |
54 |
+ { |
55 |
+ GSource source; |
56 |
++ QEventLoop::ProcessEventsFlags processEventsFlags; |
57 |
+ QList<GPollFDWithQSocketNotifier *> pollfds; |
58 |
+ }; |
59 |
+ |
60 |
+@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source) |
61 |
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
62 |
+ |
63 |
+ bool pending = false; |
64 |
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) |
65 |
++ return pending; |
66 |
++ |
67 |
+ for (int i = 0; !pending && i < src->pollfds.count(); ++i) { |
68 |
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
69 |
+ |
70 |
+@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin |
71 |
+ QEvent event(QEvent::SockAct); |
72 |
+ |
73 |
+ GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); |
74 |
++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) |
75 |
++ return true; |
76 |
++ |
77 |
+ for (int i = 0; i < src->pollfds.count(); ++i) { |
78 |
+ GPollFDWithQSocketNotifier *p = src->pollfds.at(i); |
79 |
+ |
80 |
+@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) |
81 |
+ reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs, |
82 |
+ sizeof(GSocketNotifierSource))); |
83 |
+ (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>(); |
84 |
++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents; |
85 |
+ g_source_set_can_recurse(&socketNotifierSource->source, true); |
86 |
+ g_source_attach(&socketNotifierSource->source, mainContext); |
87 |
+ |
88 |
+@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) |
89 |
+ // tell postEventSourcePrepare() and timerSource about any new flags |
90 |
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; |
91 |
+ d->timerSource->processEventsFlags = flags; |
92 |
++ d->socketNotifierSource->processEventsFlags = flags; |
93 |
+ |
94 |
+ if (!(flags & QEventLoop::EventLoopExec)) { |
95 |
+ // force timers to be sent at normal priority |
96 |
+@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) |
97 |
+ result = g_main_context_iteration(d->mainContext, canWait); |
98 |
+ |
99 |
+ d->timerSource->processEventsFlags = savedFlags; |
100 |
++ d->socketNotifierSource->processEventsFlags = savedFlags; |
101 |
+ |
102 |
+ if (canWait) |
103 |
+ emit awake(); |
104 |
+-- |
105 |
+2.0.0 |
106 |
+ |
107 |
|
108 |
diff --git a/dev-qt/qtcore/files/moc-boost-lexical-cast.patch b/dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch |
109 |
similarity index 100% |
110 |
rename from dev-qt/qtcore/files/moc-boost-lexical-cast.patch |
111 |
rename to dev-qt/qtcore/files/qtcore-4.8.5-moc-boost-lexical-cast.patch |
112 |
|
113 |
diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch |
114 |
new file mode 100644 |
115 |
index 0000000..6d3bf2f |
116 |
--- /dev/null |
117 |
+++ b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch |
118 |
@@ -0,0 +1,94 @@ |
119 |
+--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100 |
120 |
++++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200 |
121 |
+@@ -255,22 +255,30 @@ struct GPostEventSource |
122 |
+ GSource source; |
123 |
+ QAtomicInt serialNumber; |
124 |
+ int lastSerialNumber; |
125 |
++ QEventLoop::ProcessEventsFlags processEventsFlags; |
126 |
+ QEventDispatcherGlibPrivate *d; |
127 |
+ }; |
128 |
+ |
129 |
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout) |
130 |
+ { |
131 |
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
132 |
+ QThreadData *data = QThreadData::current(); |
133 |
+ if (!data) |
134 |
+ return false; |
135 |
+ |
136 |
++ QEventLoop::ProcessEventsFlags excludeAllFlags |
137 |
++ = QEventLoop::ExcludeUserInputEvents |
138 |
++ | QEventLoop::ExcludeSocketNotifiers |
139 |
++ | QEventLoop::X11ExcludeTimers; |
140 |
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags) |
141 |
++ return false; |
142 |
++ |
143 |
+ gint dummy; |
144 |
+ if (!timeout) |
145 |
+ timeout = &dummy; |
146 |
+ const bool canWait = data->canWaitLocked(); |
147 |
+ *timeout = canWait ? -1 : 0; |
148 |
+ |
149 |
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
150 |
+ return (!canWait |
151 |
+ || (source->serialNumber != source->lastSerialNumber)); |
152 |
+ } |
153 |
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch( |
154 |
+ { |
155 |
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); |
156 |
+ source->lastSerialNumber = source->serialNumber; |
157 |
+- QCoreApplication::sendPostedEvents(); |
158 |
+- source->d->runTimersOnceWithNormalPriority(); |
159 |
++ QEventLoop::ProcessEventsFlags excludeAllFlags |
160 |
++ = QEventLoop::ExcludeUserInputEvents |
161 |
++ | QEventLoop::ExcludeSocketNotifiers |
162 |
++ | QEventLoop::X11ExcludeTimers; |
163 |
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) { |
164 |
++ QCoreApplication::sendPostedEvents(); |
165 |
++ source->d->runTimersOnceWithNormalPriority(); |
166 |
++ } |
167 |
+ return true; // i dunno, george... |
168 |
+ } |
169 |
+ |
170 |
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa |
171 |
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs, |
172 |
+ sizeof(GPostEventSource))); |
173 |
+ postEventSource->serialNumber = 1; |
174 |
++ postEventSource->processEventsFlags = QEventLoop::AllEvents; |
175 |
+ postEventSource->d = this; |
176 |
+ g_source_set_can_recurse(&postEventSource->source, true); |
177 |
+ g_source_attach(&postEventSource->source, mainContext); |
178 |
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents |
179 |
+ |
180 |
+ // tell postEventSourcePrepare() and timerSource about any new flags |
181 |
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; |
182 |
++ d->postEventSource->processEventsFlags = flags; |
183 |
+ d->timerSource->processEventsFlags = flags; |
184 |
+ d->socketNotifierSource->processEventsFlags = flags; |
185 |
+ |
186 |
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents |
187 |
+ while (!result && canWait) |
188 |
+ result = g_main_context_iteration(d->mainContext, canWait); |
189 |
+ |
190 |
++ d->postEventSource->processEventsFlags = savedFlags; |
191 |
+ d->timerSource->processEventsFlags = savedFlags; |
192 |
+ d->socketNotifierSource->processEventsFlags = savedFlags; |
193 |
+ |
194 |
+--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200 |
195 |
++++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200 |
196 |
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents |
197 |
+ |
198 |
+ // we are awake, broadcast it |
199 |
+ emit awake(); |
200 |
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); |
201 |
++ |
202 |
++ QEventLoop::ProcessEventsFlags excludeAllFlags |
203 |
++ = QEventLoop::ExcludeUserInputEvents |
204 |
++ | QEventLoop::ExcludeSocketNotifiers |
205 |
++ | QEventLoop::X11ExcludeTimers; |
206 |
++ if ((flags & excludeAllFlags) == excludeAllFlags) |
207 |
++ return false; |
208 |
++ if(( flags & excludeAllFlags ) != excludeAllFlags ) |
209 |
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); |
210 |
+ |
211 |
+ int nevents = 0; |
212 |
+ const bool canWait = (d->threadData->canWaitLocked() |
213 |
|
214 |
diff --git a/dev-qt/qtcore/qtcore-4.8.6.ebuild b/dev-qt/qtcore/qtcore-4.8.6.ebuild |
215 |
index c446934..b7e20b6 100644 |
216 |
--- a/dev-qt/qtcore/qtcore-4.8.6.ebuild |
217 |
+++ b/dev-qt/qtcore/qtcore-4.8.6.ebuild |
218 |
@@ -29,7 +29,9 @@ PDEPEND=" |
219 |
" |
220 |
|
221 |
PATCHES=( |
222 |
- "${FILESDIR}/moc-boost-lexical-cast.patch" |
223 |
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch" |
224 |
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968 |
225 |
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968 |
226 |
) |
227 |
|
228 |
QT4_TARGET_DIRECTORIES=" |
229 |
|
230 |
diff --git a/dev-qt/qtcore/qtcore-4.8.9999.ebuild b/dev-qt/qtcore/qtcore-4.8.9999.ebuild |
231 |
index c446934..b7e20b6 100644 |
232 |
--- a/dev-qt/qtcore/qtcore-4.8.9999.ebuild |
233 |
+++ b/dev-qt/qtcore/qtcore-4.8.9999.ebuild |
234 |
@@ -29,7 +29,9 @@ PDEPEND=" |
235 |
" |
236 |
|
237 |
PATCHES=( |
238 |
- "${FILESDIR}/moc-boost-lexical-cast.patch" |
239 |
+ "${FILESDIR}/${PN}-4.8.5-moc-boost-lexical-cast.patch" |
240 |
+ "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968 |
241 |
+ "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968 |
242 |
) |
243 |
|
244 |
QT4_TARGET_DIRECTORIES=" |