[SCM] Qt 4 packaging branch, kubuntu_vivid_archive, updated. debian/4.8.6+git64-g5dc8b2b+dfsg-2-14-gb24950d
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Mon Jan 12 15:49:02 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qt4-x11.git;a=commitdiff;h=b24950d
The following commit has been merged in the kubuntu_vivid_archive branch:
commit b24950dc41e82f3fa8c8c0b398c2367429953d59
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Mon Jan 12 18:48:58 2015 +0300
Really add two qclipboard patches
---
debian/patches/kubuntu_qclipboard_delay.diff | 35 +++++++
.../patches/kubuntu_qclipboard_fix_recursive.diff | 105 +++++++++++++++++++++
2 files changed, 140 insertions(+)
diff --git a/debian/patches/kubuntu_qclipboard_delay.diff b/debian/patches/kubuntu_qclipboard_delay.diff
new file mode 100644
index 0000000..a8cc8c1
--- /dev/null
+++ b/debian/patches/kubuntu_qclipboard_delay.diff
@@ -0,0 +1,35 @@
+Description: Delays with QClipboard and "useEventLoop"
+ If LibreOffice is running with KDE integration and KFileDialog is
+ open, if clipboard contents are held by LO (i.e. Ctrl+C in LO before
+ the dialog is opened), then there is a visible delay when moving the
+ mouse over the dialog contents. This is because KFileDialog
+ repeatedly checks clipboard contents and these checks take visibly
+ long (and there's not so few of them).
+ .
+ LO/Qt integration needs to set QClipboard to "useEventLoop" mode. The
+ code there adds 50ms delay to every single clipboard data fetch,
+ presumably to avoid busy-looping, but it's quite long and often
+ needless.
+ .
+ The attached patch avoids any visible delay in the KFileDialog in this case.
+Author: Luboš Luňák
+Origin: other>, see bug
+Bug: https://bugreports.qt-project.org/browse/QTBUG-38585
+Forwarded: see bug
+Applied-Upstream: not yet
+Reviewed-by: Jonathan Riddell
+Last-Update: 2014-11-22
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- qt/src/gui/kernel/qclipboard_x11.cpp.sav 2014-04-25 09:52:03.855693228 +0200
++++ qt/src/gui/kernel/qclipboard_x11.cpp 2014-04-25 09:51:58.038693777 +0200
+@@ -548,7 +548,8 @@ bool QX11Data::clipboardWaitForEvent(Win
+ return false;
+
+ XSync(X11->display, false);
+- usleep(50000);
++ if (!XPending(X11->display))
++ usleep(5000);
+
+ now.start();
+
diff --git a/debian/patches/kubuntu_qclipboard_fix_recursive.diff b/debian/patches/kubuntu_qclipboard_fix_recursive.diff
new file mode 100644
index 0000000..fc313ae
--- /dev/null
+++ b/debian/patches/kubuntu_qclipboard_fix_recursive.diff
@@ -0,0 +1,105 @@
+Description: Repaint errors when run with X11 clipboard code branch
+ Fixes crash in LibreOffice with KDE integration
+Author: Jan-Marek Glogowski
+Origin: see bug
+Bug: https://bugreports.qt-project.org/browse/QTBUG-34614
+Forwarded: see bug
+Applied-Upstream: nope
+Reviewed-by: Jonathan Riddell
+Last-Update: 2014-11-22
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- qt/src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100
++++ qt/src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200
+@@ -255,22 +255,30 @@ struct GPostEventSource
+ GSource source;
+ QAtomicInt serialNumber;
+ int lastSerialNumber;
++ QEventLoop::ProcessEventsFlags processEventsFlags;
+ QEventDispatcherGlibPrivate *d;
+ };
+
+ static gboolean postEventSourcePrepare(GSource *s, gint *timeout)
+ {
++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ QThreadData *data = QThreadData::current();
+ if (!data)
+ return false;
+
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags)
++ return false;
++
+ gint dummy;
+ if (!timeout)
+ timeout = &dummy;
+ const bool canWait = data->canWaitLocked();
+ *timeout = canWait ? -1 : 0;
+
+- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ return (!canWait
+ || (source->serialNumber != source->lastSerialNumber));
+ }
+@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch(
+ {
+ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s);
+ source->lastSerialNumber = source->serialNumber;
+- QCoreApplication::sendPostedEvents();
+- source->d->runTimersOnceWithNormalPriority();
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) {
++ QCoreApplication::sendPostedEvents();
++ source->d->runTimersOnceWithNormalPriority();
++ }
+ return true; // i dunno, george...
+ }
+
+@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa
+ postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs,
+ sizeof(GPostEventSource)));
+ postEventSource->serialNumber = 1;
++ postEventSource->processEventsFlags = QEventLoop::AllEvents;
+ postEventSource->d = this;
+ g_source_set_can_recurse(&postEventSource->source, true);
+ g_source_attach(&postEventSource->source, mainContext);
+@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents
+
+ // tell postEventSourcePrepare() and timerSource about any new flags
+ QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags;
++ d->postEventSource->processEventsFlags = flags;
+ d->timerSource->processEventsFlags = flags;
+ d->socketNotifierSource->processEventsFlags = flags;
+
+@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents
+ while (!result && canWait)
+ result = g_main_context_iteration(d->mainContext, canWait);
+
++ d->postEventSource->processEventsFlags = savedFlags;
+ d->timerSource->processEventsFlags = savedFlags;
+ d->socketNotifierSource->processEventsFlags = savedFlags;
+
+--- qt/src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200
++++ qt/src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200
+@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents
+
+ // we are awake, broadcast it
+ emit awake();
+- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
++
++ QEventLoop::ProcessEventsFlags excludeAllFlags
++ = QEventLoop::ExcludeUserInputEvents
++ | QEventLoop::ExcludeSocketNotifiers
++ | QEventLoop::X11ExcludeTimers;
++ if ((flags & excludeAllFlags) == excludeAllFlags)
++ return false;
++ if(( flags & excludeAllFlags ) != excludeAllFlags )
++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData);
+
+ int nevents = 0;
+ const bool canWait = (d->threadData->canWaitLocked()
--
Qt 4 packaging
More information about the pkg-kde-commits
mailing list