[packages/qt4] - rel 10; more patches from FC; rename few old patches to match FC names
arekm
arekm at pld-linux.org
Sun Nov 6 21:35:30 CET 2016
commit 08c7dce551992ba3f2798e592ae8e6fe4974fc99
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Nov 6 21:35:22 2016 +0100
- rel 10; more patches from FC; rename few old patches to match FC names
moc-boost-workaround.patch | 18 -
qt-4.8-poll.patch | 812 +++++++++++++++++++++
qt-cupsEnumDests.patch | 238 ++++++
...> qt-everywhere-opensource-src-4.6.2-cups.patch | 0
...source-src-4.6.3-glib_eventloop_nullcheck.patch | 69 ++
...erywhere-opensource-src-4.8.0-QTBUG-22037.patch | 41 ++
...-src-4.8.0-tp-qtreeview-kpackagekit-crash.patch | 12 +
...ere-opensource-src-4.8.2--assistant-crash.patch | 10 +-
...source-src-4.8.3-qdbusconnection_no_debug.patch | 14 +
...rc-4.8.4-qmake_pkgconfig_requires_private.patch | 16 +
...erywhere-opensource-src-4.8.5-QTBUG-14467.patch | 24 +
...ensource-src-4.8.5-tds_no_strict_aliasing.patch | 12 +
...erywhere-opensource-src-4.8.6-QTBUG-22829.patch | 16 +
qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch | 12 +
qt-everywhere-opensource-src-4.8.7-gcc6.patch | 35 +
qt4.spec | 39 +-
16 files changed, 1338 insertions(+), 30 deletions(-)
---
diff --git a/qt4.spec b/qt4.spec
index 1d9584b..bb077a1 100644
--- a/qt4.spec
+++ b/qt4.spec
@@ -61,7 +61,7 @@ Summary(pl.UTF-8): Biblioteka Qt do tworzenia GUI
Summary(pt_BR.UTF-8): Estrutura para rodar aplicações GUI Qt
Name: qt4
Version: 4.8.7
-Release: 9
+Release: 10
License: LGPL v2.1 or GPL v3.0
Group: X11/Libraries
Source0: http://download.qt-project.org/official_releases/qt/4.8/%{version}/qt-everywhere-opensource-src-%{version}.tar.gz
@@ -87,8 +87,7 @@ Patch8: %{name}-ibase.patch
Patch9: qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch
Patch10: webkit-no_Werror.patch
Patch11: %{name}-wkhtml.patch
-Patch12: fix-crash-in-assistant.patch
-Patch13: improve-cups-support.patch
+
Patch14: x32.patch
# backported from Qt5 (essentially)
# http://bugzilla.redhat.com/702493
@@ -97,7 +96,6 @@ Patch15: qt-everywhere-opensource-src-4.8.4-qgtkstyle_disable_gtk_theme_check.pa
Patch16: qt-everywhere-opensource-src-4.8.3-QTBUG-4862.patch
Patch20: %{name}-oracle-instantclient.patch
-Patch27: moc-boost-workaround.patch
# from FC
Patch28: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
Patch29: qt-everywhere-opensource-src-4.8.6-QTBUG-38585.patch
@@ -106,6 +104,20 @@ Patch31: qt-everywhere-opensource-src-4.8.6-QTBUG-34614.patch
Patch32: qt-everywhere-opensource-src-4.8.5-QTBUG-35459.patch
Patch33: qt-everywhere-opensource-src-4.8.5-QTBUG-4862.patch
Patch34: qt-everywhere-opensource-src-4.8.5-QTBUG-21900.patch
+Patch35: qt-4.8-poll.patch
+Patch36: qt-cupsEnumDests.patch
+Patch37: qt-everywhere-opensource-src-4.8.4-qmake_pkgconfig_requires_private.patch
+Patch38: qt-everywhere-opensource-src-4.8.5-QTBUG-14467.patch
+Patch39: qt-everywhere-opensource-src-4.8.5-tds_no_strict_aliasing.patch
+Patch40: qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch
+Patch41: qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch
+Patch42: qt-everywhere-opensource-src-4.8.7-gcc6.patch
+Patch43: qt-everywhere-opensource-src-4.6.2-cups.patch
+Patch44: qt-everywhere-opensource-src-4.8.0-tp-qtreeview-kpackagekit-crash.patch
+Patch45: qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch
+Patch46: qt-everywhere-opensource-src-4.8.3-qdbusconnection_no_debug.patch
+Patch47: qt-everywhere-opensource-src-4.8.2--assistant-crash.patch
+Patch48: qt-everywhere-opensource-src-4.8.0-QTBUG-22037.patch
URL: http://qt-project.org/
%{?with_ibase:BuildRequires: Firebird-devel}
%{?with_openvg:BuildRequires: Mesa-libOpenVG-devel}
@@ -1509,16 +1521,13 @@ Programas exemplo para o Qt versão.
%patch9 -p1
%patch10 -p1
%{?with_wkhtml:%patch11 -p1}
-%patch12 -p1
-%patch13 -p1
+
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch20 -p1
-%patch27 -p1
-
%patch28 -p1
%patch29 -p0
%patch30 -p1
@@ -1526,6 +1535,20 @@ Programas exemplo para o Qt versão.
%patch32 -p1
%patch33 -p1
%patch34 -p1
+%patch35 -p1
+%patch36 -p1
+%patch37 -p1
+%patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p1
+%patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
%{__sed} -i -e 's,usr/X11R6/,usr/g,' mkspecs/linux-g++-64/qmake.conf \
mkspecs/common/linux.conf
diff --git a/moc-boost-workaround.patch b/moc-boost-workaround.patch
deleted file mode 100644
index bec8774..0000000
--- a/moc-boost-workaround.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-21:23:08 witekfl> https://projects.archlinux.org/svntogit/packages.git/tree/trunk/moc-boost-workaround.patch?h=packages/qt4
- Could someone add this patch to the qt4.spec and rebuild it?
-21:23:48 witekfl> This patch helps for example to build kde4-kdepim
-
-
-diff -upr qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp
---- qt-everywhere-opensource-src-4.8.6.orig/src/tools/moc/main.cpp 2014-04-10 21:37:12.000000000 +0300
-+++ qt-everywhere-opensource-src-4.8.6/src/tools/moc/main.cpp 2014-11-06 02:24:44.287305916 +0200
-@@ -190,6 +190,8 @@ int runMoc(int _argc, char **_argv)
-
- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
- pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
-+ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
-+ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
-
- QByteArray filename;
- QByteArray output;
diff --git a/qt-4.8-poll.patch b/qt-4.8-poll.patch
new file mode 100644
index 0000000..aed363c
--- /dev/null
+++ b/qt-4.8-poll.patch
@@ -0,0 +1,812 @@
+diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp.poll 2014-03-30 15:36:48.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/corelib/io/qprocess_unix.cpp 2014-03-31 18:04:05.958260978 -0500
+@@ -158,13 +158,6 @@ static void qt_sa_sigchld_sigaction(int
+ }
+ }
+
+-static inline void add_fd(int &nfds, int fd, fd_set *fdset)
+-{
+- FD_SET(fd, fdset);
+- if ((fd) > nfds)
+- nfds = fd;
+-}
+-
+ struct QProcessInfo {
+ QProcess *process;
+ int deathPipe;
+@@ -256,9 +249,9 @@ QProcessManager::~QProcessManager()
+ void QProcessManager::run()
+ {
+ forever {
+- fd_set readset;
+- FD_ZERO(&readset);
+- FD_SET(qt_qprocess_deadChild_pipe[0], &readset);
++ pollfd fd;
++ fd.fd = qt_qprocess_deadChild_pipe[0];
++ fd.events = POLLIN;
+
+ #if defined (QPROCESS_DEBUG)
+ qDebug() << "QProcessManager::run() waiting for children to die";
+@@ -267,8 +260,8 @@ void QProcessManager::run()
+ // block forever, or until activity is detected on the dead child
+ // pipe. the only other peers are the SIGCHLD signal handler, and the
+ // QProcessManager destructor.
+- int nselect = select(qt_qprocess_deadChild_pipe[0] + 1, &readset, 0, 0, 0);
+- if (nselect < 0) {
++ int ret = qt_safe_poll(&fd, 1, -1, /* retry_eintr */ false);
++ if (ret < 0) {
+ if (errno == EINTR)
+ continue;
+ break;
+@@ -1027,17 +1020,6 @@ void QProcessPrivate::killProcess()
+ ::kill(pid_t(pid), SIGKILL);
+ }
+
+-static int select_msecs(int nfds, fd_set *fdread, fd_set *fdwrite, int timeout)
+-{
+- if (timeout < 0)
+- return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
+-
+- struct timeval tv;
+- tv.tv_sec = timeout / 1000;
+- tv.tv_usec = (timeout % 1000) * 1000;
+- return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
+-}
+-
+ /*
+ Returns the difference between msecs and elapsed. If msecs is -1,
+ however, -1 is returned.
+@@ -1060,10 +1042,10 @@ bool QProcessPrivate::waitForStarted(int
+ childStartedPipe[0]);
+ #endif
+
+- fd_set fds;
+- FD_ZERO(&fds);
+- FD_SET(childStartedPipe[0], &fds);
+- if (select_msecs(childStartedPipe[0] + 1, &fds, 0, msecs) == 0) {
++ pollfd fd;
++ fd.fd = childStartedPipe[0];
++ fd.events = POLLIN;
++ if (qt_safe_poll(&fd, 1, msecs) == 0) {
+ processError = QProcess::Timedout;
+ q->setErrorString(QProcess::tr("Process operation timed out"));
+ #if defined (QPROCESS_DEBUG)
+@@ -1079,6 +1061,47 @@ bool QProcessPrivate::waitForStarted(int
+ return startedEmitted;
+ }
+
++class QProcessFDSet {
++ pollfd fds[5];
++
++ static size_t size()
++ {
++ return sizeof(fds)/sizeof(fds[0]);
++ }
++
++public:
++ QProcessFDSet(QProcessPrivate &proc)
++ {
++ for (size_t i = 0; i < size(); ++i) {
++ fds[i].fd = -1;
++ fds[i].events = POLLIN;
++ }
++ death().fd = proc.deathPipe[0];
++
++ if (proc.processState == QProcess::Starting)
++ started().fd = proc.childStartedPipe[0];
++
++ stdout().fd = proc.stdoutChannel.pipe[0];
++ stderr().fd = proc.stderrChannel.pipe[0];
++
++ if (!proc.writeBuffer.isEmpty()) {
++ stdin().fd = proc.stdinChannel.pipe[1];
++ stdin().events = POLLOUT;
++ }
++ }
++
++ int poll(int timeout)
++ {
++ return qt_safe_poll(fds, size(), timeout);
++ }
++
++ pollfd &death() { return fds[0]; }
++ pollfd &started() { return fds[1]; }
++ pollfd &stdout() { return fds[2]; }
++ pollfd &stderr() { return fds[3]; }
++ pollfd &stdin() { return fds[4]; }
++};
++
+ bool QProcessPrivate::waitForReadyRead(int msecs)
+ {
+ Q_Q(QProcess);
+@@ -1090,28 +1113,9 @@ bool QProcessPrivate::waitForReadyRead(i
+ stopWatch.start();
+
+ forever {
+- fd_set fdread;
+- fd_set fdwrite;
+-
+- FD_ZERO(&fdread);
+- FD_ZERO(&fdwrite);
+-
+- int nfds = deathPipe[0];
+- FD_SET(deathPipe[0], &fdread);
+-
+- if (processState == QProcess::Starting)
+- add_fd(nfds, childStartedPipe[0], &fdread);
+-
+- if (stdoutChannel.pipe[0] != -1)
+- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
+- if (stderrChannel.pipe[0] != -1)
+- add_fd(nfds, stderrChannel.pipe[0], &fdread);
+-
+- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
+- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
+-
++ QProcessFDSet fdset(*this);
+ int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
+- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
++ int ret = fdset.poll(timeout);
+ if (ret < 0) {
+ break;
+ }
+@@ -1121,18 +1125,18 @@ bool QProcessPrivate::waitForReadyRead(i
+ return false;
+ }
+
+- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
++ if (qt_readable(fdset.started())) {
+ if (!_q_startupNotification())
+ return false;
+ }
+
+ bool readyReadEmitted = false;
+- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread)) {
++ if (qt_readable(fdset.stdout())) {
+ bool canRead = _q_canReadStandardOutput();
+ if (processChannel == QProcess::StandardOutput && canRead)
+ readyReadEmitted = true;
+ }
+- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread)) {
++ if (qt_readable(fdset.stderr())) {
+ bool canRead = _q_canReadStandardError();
+ if (processChannel == QProcess::StandardError && canRead)
+ readyReadEmitted = true;
+@@ -1140,13 +1144,13 @@ bool QProcessPrivate::waitForReadyRead(i
+ if (readyReadEmitted)
+ return true;
+
+- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
++ if (qt_writable(fdset.stdin()))
+ _q_canWrite();
+
+- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
++ if (qt_readable(fdset.death())) {
+ if (_q_processDied())
+ return false;
+- }
++ }
+ }
+ return false;
+ }
+@@ -1162,29 +1166,9 @@ bool QProcessPrivate::waitForBytesWritte
+ stopWatch.start();
+
+ while (!writeBuffer.isEmpty()) {
+- fd_set fdread;
+- fd_set fdwrite;
+-
+- FD_ZERO(&fdread);
+- FD_ZERO(&fdwrite);
+-
+- int nfds = deathPipe[0];
+- FD_SET(deathPipe[0], &fdread);
+-
+- if (processState == QProcess::Starting)
+- add_fd(nfds, childStartedPipe[0], &fdread);
+-
+- if (stdoutChannel.pipe[0] != -1)
+- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
+- if (stderrChannel.pipe[0] != -1)
+- add_fd(nfds, stderrChannel.pipe[0], &fdread);
+-
+-
+- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
+- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
+-
++ QProcessFDSet fdset(*this);
+ int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
+- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
++ int ret = fdset.poll(timeout);
+ if (ret < 0) {
+ break;
+ }
+@@ -1195,24 +1179,24 @@ bool QProcessPrivate::waitForBytesWritte
+ return false;
+ }
+
+- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
++ if (qt_readable(fdset.started())) {
+ if (!_q_startupNotification())
+ return false;
+ }
+
+- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
++ if (qt_writable(fdset.stdin()))
+ return _q_canWrite();
+
+- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
++ if (qt_readable(fdset.stdout()))
+ _q_canReadStandardOutput();
+
+- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
++ if (qt_readable(fdset.stderr()))
+ _q_canReadStandardError();
+
+- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
+- if (_q_processDied())
+- return false;
+- }
++ if (qt_readable(fdset.death())) {
++ if (_q_processDied())
++ return false;
++ }
+ }
+
+ return false;
+@@ -1229,29 +1213,9 @@ bool QProcessPrivate::waitForFinished(in
+ stopWatch.start();
+
+ forever {
+- fd_set fdread;
+- fd_set fdwrite;
+- int nfds = -1;
+-
+- FD_ZERO(&fdread);
+- FD_ZERO(&fdwrite);
+-
+- if (processState == QProcess::Starting)
+- add_fd(nfds, childStartedPipe[0], &fdread);
+-
+- if (stdoutChannel.pipe[0] != -1)
+- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
+- if (stderrChannel.pipe[0] != -1)
+- add_fd(nfds, stderrChannel.pipe[0], &fdread);
+-
+- if (processState == QProcess::Running)
+- add_fd(nfds, deathPipe[0], &fdread);
+-
+- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
+- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
+-
++ QProcessFDSet fdset(*this);
+ int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
+- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
++ int ret = fdset.poll(timeout);
+ if (ret < 0) {
+ break;
+ }
+@@ -1261,20 +1225,20 @@ bool QProcessPrivate::waitForFinished(in
+ return false;
+ }
+
+- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
++ if (qt_readable(fdset.started())) {
+ if (!_q_startupNotification())
+ return false;
+ }
+- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
++ if (qt_writable(fdset.stdin()))
+ _q_canWrite();
+
+- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
++ if (qt_readable(fdset.stdout()))
+ _q_canReadStandardOutput();
+
+- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
++ if (qt_readable(fdset.stderr()))
+ _q_canReadStandardError();
+
+- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
++ if (qt_readable(fdset.death())) {
+ if (_q_processDied())
+ return true;
+ }
+@@ -1284,10 +1248,10 @@ bool QProcessPrivate::waitForFinished(in
+
+ bool QProcessPrivate::waitForWrite(int msecs)
+ {
+- fd_set fdwrite;
+- FD_ZERO(&fdwrite);
+- FD_SET(stdinChannel.pipe[1], &fdwrite);
+- return select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1;
++ pollfd fd;
++ fd.fd = stdinChannel.pipe[1];
++ fd.events = POLLIN;
++ return qt_safe_poll(&fd, 1, msecs);
+ }
+
+ void QProcessPrivate::findExitCode()
+diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp.poll 2014-03-30 15:36:48.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix.cpp 2014-03-31 18:01:59.369715403 -0500
+@@ -99,4 +99,165 @@ int qt_safe_select(int nfds, fd_set *fdr
+ }
+ }
+
++#ifndef Q_OS_VXWORKS
++
++int qt_safe_poll(struct pollfd *fds, int nfds, int timeout_ms, bool retry_eintr)
++{
++ if (nfds == 0)
++ return 0;
++ if (nfds < 0) {
++ errno = EINVAL;
++ return -1;
++ }
++
++ // Retry on ret == 0 if the deadline has not yet passed because
++ // Linux can return early from the syscall, without setting EINTR.
++ if (timeout_ms < 0) {
++ forever {
++ int ret = ::poll(fds, nfds, -1);
++ if (ret > 0)
++ return ret;
++ if (retry_eintr) {
++ if (ret == 0 || ret == -1 && errno == EINTR) {
++ continue;
++ } else {
++ return -1;
++ }
++ }
++ if (ret == 0) {
++ errno = EINTR;
++ return -1;
++ }
++ return ret;
++ }
++ }
++
++ timeval previous = qt_gettime();
++ timeval deadline = previous;
++ deadline.tv_sec += timeout_ms / 1000;
++ deadline.tv_usec += (timeout_ms % 1000) * 1000;
++ if (deadline.tv_usec >= 1000000) {
++ ++deadline.tv_sec;
++ deadline.tv_usec -= 1000000;
++ }
++ int remaining = timeout_ms;
++
++ forever {
++ int ret = ::poll(fds, nfds, remaining);
++ if (ret > 0)
++ return ret;
++ timeval now = qt_gettime();
++ if ((now.tv_sec > deadline.tv_sec // past deadline
++ || (now.tv_sec == deadline.tv_sec
++ && now.tv_usec >= deadline.tv_usec))
++ || (now.tv_sec < previous.tv_sec // time warp
++ || (now.tv_sec == previous.tv_sec
++ && now.tv_usec < previous.tv_usec))
++ || (ret < 0 && (errno != EINTR || !retry_eintr))) // other error
++ return ret;
++ if (ret == 0 && !retry_eintr) {
++ errno = EINTR;
++ return -1;
++ }
++ remaining = (deadline.tv_sec - now.tv_sec) * 1000
++ + (deadline.tv_usec - now.tv_usec) / 1000;
++ previous = now;
++ }
++}
++
++#else
++
++// Poll emulation for VxWorks.
++
++static int mark_bad_descriptors(pollfd *fds, int nfds)
++{
++ fd_set r;
++ FD_ZERO(&r);
++ struct timeval tv;
++ tv.tv_sec = 0;
++ tv.tv_usec = 0;
++ int ret = 0;
++
++ // Check each descriptor invidually for badness.
++ for (int i = 0; i < nfds; ++i) {
++ pollfd &fd(fds[i]);
++ if (fd.fd >= 0) {
++ FD_SET(fd.fd, &r);
++ int ret = qt_safe_select(fd.fd + 1, &r, NULL, NULL, &tv);
++ FD_CLR(fd.fd, &r);
++ if (ret < 0 && errno == EBADF) {
++ fd.revents = POLLNVAL;
++ ++ret;
++ }
++ }
++ }
++ Q_ASSERT(ret > 0);
++ return ret;
++}
++
++int qt_safe_poll(pollfd *fds, int nfds, int timeout, bool retry_eintr)
++{
++ fd_set r, w;
++ FD_ZERO(&r);
++ FD_ZERO(&w);
++ int maxfd = -1;
++
++ // Extract the watched descriptors.
++ for (int i = 0; i < nfds; ++i) {
++ pollfd &fd(fds[i]);
++ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
++ if (fd.events & POLLIN) {
++ FD_SET(fd.fd, &r);
++ if (fd.fd > maxfd)
++ maxfd = fd.fd;
++ }
++ if (fd.events & POLLOUT) {
++ FD_SET(fd.fd, &w);
++ if (fd.fd > maxfd)
++ maxfd = fd.fd;
++ }
++ }
++ }
++
++ // If timeout is negative, wait indefinitely for activity.
++ timeval tv;
++ timeval *ptv;
++ if (timeout >= 0) {
++ tv.tv_sec = timeout / 1000;
++ tv.tv_usec = (timeout % 1000) * 1000;
++ ptv = &tv;
++ } else
++ ptv = NULL;
++
++ int ret;
++ if (retry_eintr)
++ ret = qt_safe_select(maxfd + 1, &r, &w, NULL, ptv);
++ else
++ ret = ::select(maxfd + 1, &r, &w, NULL, ptv);
++ if (ret < 0 && errno == EBADF) {
++ return mark_bad_descriptors(fds, nfds);
++ }
++ if (ret <= 0)
++ return ret;
++
++ // Set the revents flags.
++ ret = 0;
++ for (int i = 0; i < nfds; ++i) {
++ pollfd &fd(fds[i]);
++ fd.revents = 0;
++ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
++ if ((fd.events & POLLIN) && FD_ISSET(fd.fd, &r))
++ fd.revents |= POLLIN;
++ if ((fd.events & POLLOUT) && FD_ISSET(fd.fd, &w))
++ fd.revents |= POLLOUT;
++ if (fd.revents)
++ ++ret;
++ }
++ }
++ Q_ASSERT(ret > 0);
++ return ret;
++}
++
++#endif
++
+ QT_END_NAMESPACE
+diff -up qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h.poll qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h
+--- qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h.poll 2014-03-30 15:36:48.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/corelib/kernel/qcore_unix_p.h 2014-03-31 18:01:59.370715392 -0500
+@@ -345,9 +345,42 @@ static inline pid_t qt_safe_waitpid(pid_
+
+ timeval qt_gettime(); // in qelapsedtimer_mac.cpp or qtimestamp_unix.cpp
+
++// Deprecated due to FD_SETSIZE limitation, use qt_safe_poll instead.
+ Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
+ const struct timeval *tv);
+
++#ifndef Q_OS_VXWORKS
++#include <poll.h>
++#else
++
++// Poll emulation for VxWorks.
++
++struct pollfd {
++ int fd;
++ short events;
++ short revents;
++};
++
++#define POLLIN 1
++#define POLLOUT 2
++#define POLLERR 4
++#define POLLHUP 8
++#define POLLNVAL 16
++#endif
++
++inline bool qt_readable(const pollfd &fd)
++{
++ return fd.fd >= 0 && (fd.revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL)) != 0;
++}
++
++inline bool qt_writable(const pollfd &fd)
++{
++ return fd.fd >= 0 && (fd.revents & (POLLOUT | POLLHUP | POLLERR | POLLNVAL)) != 0;
++}
++
++Q_CORE_EXPORT int qt_safe_poll(pollfd *fds, int nfds, int timeout,
++ bool retry_eintr = true);
++
+ // according to X/OPEN we have to define semun ourselves
+ // we use prefix as on some systems sem.h will have it
+ struct semid_ds;
+diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalserver_unix.cpp 2014-03-31 18:01:59.370715392 -0500
+@@ -208,16 +208,11 @@ void QLocalServerPrivate::_q_onNewConnec
+
+ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
+ {
+- fd_set readfds;
+- FD_ZERO(&readfds);
+- FD_SET(listenSocket, &readfds);
++ struct pollfd fd;
++ fd.fd = listenSocket;
++ fd.events = POLLIN;
+
+- timeval timeout;
+- timeout.tv_sec = msec / 1000;
+- timeout.tv_usec = (msec % 1000) * 1000;
+-
+- int result = -1;
+- result = qt_safe_select(listenSocket + 1, &readfds, 0, 0, (msec == -1) ? 0 : &timeout);
++ int result = qt_safe_poll(&fd, 1, msec);
+ if (-1 == result) {
+ setError(QLatin1String("QLocalServer::waitForNewConnection"));
+ closeServer();
+diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qlocalsocket_unix.cpp 2014-03-31 18:01:59.370715392 -0500
+@@ -56,10 +56,6 @@
+ #include <qdebug.h>
+ #include <qelapsedtimer.h>
+
+-#ifdef Q_OS_VXWORKS
+-# include <selectLib.h>
+-#endif
+-
+ #define QT_CONNECT_TIMEOUT 30000
+
+ QT_BEGIN_NAMESPACE
+@@ -520,32 +516,17 @@ bool QLocalSocket::waitForConnected(int
+ if (state() != ConnectingState)
+ return (state() == ConnectedState);
+
+- fd_set fds;
+- FD_ZERO(&fds);
+- FD_SET(d->connectingSocket, &fds);
+-
+- timeval timeout;
+- timeout.tv_sec = msec / 1000;
+- timeout.tv_usec = (msec % 1000) * 1000;
+-
+- // timeout can not be 0 or else select will return an error.
+- if (0 == msec)
+- timeout.tv_usec = 1000;
++ pollfd fd;
++ fd.fd = d->connectingSocket;
++ fd.events = POLLIN | POLLOUT;
+
+ int result = -1;
+ // on Linux timeout will be updated by select, but _not_ on other systems.
+ QElapsedTimer timer;
++ int remaining = msec;
+ timer.start();
+- while (state() == ConnectingState
+- && (-1 == msec || timer.elapsed() < msec)) {
+-#ifdef Q_OS_SYMBIAN
+- // On Symbian, ready-to-write is signaled when non-blocking socket
+- // connect is finised. Is ready-to-read really used on other
+- // UNIX paltforms when using non-blocking AF_UNIX socket?
+- result = ::select(d->connectingSocket + 1, 0, &fds, 0, &timeout);
+-#else
+- result = ::select(d->connectingSocket + 1, &fds, 0, 0, &timeout);
+-#endif
++ while (state() == ConnectingState) {
++ result = qt_safe_poll(&fd, 1, remaining, /* retry_eintr */ false);
+ if (-1 == result && errno != EINTR) {
+ d->errorOccurred( QLocalSocket::UnknownSocketError,
+ QLatin1String("QLocalSocket::waitForConnected"));
+@@ -553,6 +534,11 @@ bool QLocalSocket::waitForConnected(int
+ }
+ if (result > 0)
+ d->_q_connectToSocket();
++ if (msec >= 0) {
++ remaining = timer.elapsed() - msec;
++ if (remaining < 0)
++ break;
++ }
+ }
+
+ return (state() == ConnectedState);
+diff -up qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/network/socket/qnativesocketengine_unix.cpp 2014-03-31 18:01:59.371715381 -0500
+@@ -1068,48 +1068,40 @@ qint64 QNativeSocketEnginePrivate::nativ
+
+ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) const
+ {
+- fd_set fds;
+- FD_ZERO(&fds);
+- FD_SET(socketDescriptor, &fds);
+-
+- struct timeval tv;
+- tv.tv_sec = timeout / 1000;
+- tv.tv_usec = (timeout % 1000) * 1000;
+-
+- int retval;
+- if (selectForRead)
+- retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
+- else
+- retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
+-
+- return retval;
++ struct pollfd fd;
++ fd.fd = socketDescriptor;
++ if (selectForRead) {
++ fd.events = POLLIN;
++ } else {
++ fd.events = POLLOUT;
++ }
++ return qt_safe_poll(&fd, 1, timeout);
+ }
+
+ int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool checkWrite,
+ bool *selectForRead, bool *selectForWrite) const
+ {
+- fd_set fdread;
+- FD_ZERO(&fdread);
++ struct pollfd fd;
++ fd.fd = socketDescriptor;
+ if (checkRead)
+- FD_SET(socketDescriptor, &fdread);
+-
+- fd_set fdwrite;
+- FD_ZERO(&fdwrite);
++ fd.events = POLLIN;
++ else
++ fd.events = 0;
+ if (checkWrite)
+- FD_SET(socketDescriptor, &fdwrite);
+-
+- struct timeval tv;
+- tv.tv_sec = timeout / 1000;
+- tv.tv_usec = (timeout % 1000) * 1000;
+-
+- int ret;
+- ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
+-
++ fd.events |= POLLOUT;
++ int ret = qt_safe_poll(&fd, 1, timeout);
+ if (ret <= 0)
+- return ret;
+- *selectForRead = FD_ISSET(socketDescriptor, &fdread);
+- *selectForWrite = FD_ISSET(socketDescriptor, &fdwrite);
+-
++ return ret;
++ bool r = (fd.revents & (POLLIN | POLLHUP | POLLERR)) != 0;
++ bool w = (fd.revents & (POLLOUT | POLLHUP | POLLERR)) != 0;
++ // Emulate the return value from select(2).
++ ret = 0;
++ if (r)
++ ++ret;
++ if (w)
++ ++ret;
++ *selectForRead = r;
++ *selectForWrite = w;
+ return ret;
+ }
+
+diff -up qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/qt3support/network/q3socketdevice_unix.cpp 2014-03-31 18:01:59.371715381 -0500
+@@ -68,6 +68,7 @@ static inline int qt_socket_socket(int d
+ #endif
+
+ #include "q3socketdevice.h"
++#include "private/qcore_unix_p.h"
+
+ #ifndef QT_NO_NETWORK
+
+@@ -588,19 +589,10 @@ Q_LONG Q3SocketDevice::waitForMore( int
+ {
+ if ( !isValid() )
+ return -1;
+- if ( fd >= FD_SETSIZE )
+- return -1;
+-
+- fd_set fds;
+- struct timeval tv;
+-
+- FD_ZERO( &fds );
+- FD_SET( fd, &fds );
+-
+- tv.tv_sec = msecs / 1000;
+- tv.tv_usec = (msecs % 1000) * 1000;
+
+- int rv = select( fd+1, &fds, 0, 0, msecs < 0 ? 0 : &tv );
++ pollfd pfd;
++ pfd.fd = fd;
++ int rv = qt_safe_poll(&pfd, 1, msecs, /* retry_eintr */ false);
+
+ if ( rv < 0 )
+ return -1;
+diff -up qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp.poll qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp
+--- qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp.poll 2014-03-30 15:36:49.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.6/src/qt3support/other/q3process_unix.cpp 2014-03-31 18:01:59.372715370 -0500
+@@ -981,13 +981,10 @@ bool Q3Process::isRunning() const
+ // On heavy processing, the socket notifier for the sigchild might not
+ // have found time to fire yet.
+ if ( d->procManager && d->procManager->sigchldFd[1] < FD_SETSIZE ) {
+- fd_set fds;
+- struct timeval tv;
+- FD_ZERO( &fds );
+- FD_SET( d->procManager->sigchldFd[1], &fds );
+- tv.tv_sec = 0;
+- tv.tv_usec = 0;
+- if ( ::select( d->procManager->sigchldFd[1]+1, &fds, 0, 0, &tv ) > 0 )
++ pollfd fd;
++ fd.fd = d->procManager->sigchldFd[1];
++ fd.events = POLLIN;
++ if ( qt_safe_poll(&fd, 1, 0, /* retry_eintr */ false) > 0 )
+ d->procManager->sigchldHnd( d->procManager->sigchldFd[1] );
+ }
+
+@@ -1124,29 +1121,21 @@ void Q3Process::socketRead( int fd )
+ }
+ }
+
+- if ( fd < FD_SETSIZE ) {
+- fd_set fds;
+- struct timeval tv;
+- FD_ZERO( &fds );
+- FD_SET( fd, &fds );
+- tv.tv_sec = 0;
+- tv.tv_usec = 0;
+- while ( ::select( fd+1, &fds, 0, 0, &tv ) > 0 ) {
+- // prepare for the next round
+- FD_ZERO( &fds );
+- FD_SET( fd, &fds );
+- // read data
+- ba = new QByteArray( basize );
+- n = ::read( fd, ba->data(), basize );
+- if ( n > 0 ) {
+- ba->resize( n );
+- buffer->append( ba );
+- ba = 0;
+- } else {
+- delete ba;
+- ba = 0;
+- break;
+- }
++ pollfd pfd;
++ pfd.fd = fd;
++ pfd.events = POLLIN;
++ while (qt_safe_poll(&pfd, 1, 0)) {
++ // read data
++ ba = new QByteArray( basize );
++ n = ::read( fd, ba->data(), basize );
++ if ( n > 0 ) {
++ ba->resize( n );
++ buffer->append( ba );
++ ba = 0;
++ } else {
++ delete ba;
++ ba = 0;
++ break;
+ }
+ }
+
diff --git a/qt-cupsEnumDests.patch b/qt-cupsEnumDests.patch
new file mode 100644
index 0000000..7d59f22
--- /dev/null
+++ b/qt-cupsEnumDests.patch
@@ -0,0 +1,238 @@
+diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp
+--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp.cupsEnumDests 2012-11-23 10:09:53.000000000 +0000
++++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups.cpp 2013-07-03 15:30:06.232936976 +0100
+@@ -50,9 +50,19 @@
+
+ QT_BEGIN_NAMESPACE
+
++typedef int (*CupsEnumDests)(unsigned flags, int msec, int *cancel,
++ cups_ptype_t type, cups_ptype_t mask,
++ cups_dest_cb_t cb, void *user_data);
++typedef http_t * (*CupsConnectDest)(cups_dest_t *dest, unsigned flags,
++ int msec, int *cancel,
++ char *resource, size_t resourcesize,
++ cups_dest_cb_t cb, void *user_data);
++typedef int (*CupsCopyDest)(cups_dest_t *dest, int num_dests,
++ cups_dest_t **dests);
+ typedef int (*CupsGetDests)(cups_dest_t **dests);
+ typedef void (*CupsFreeDests)(int num_dests, cups_dest_t *dests);
+ typedef const char* (*CupsGetPPD)(const char *printer);
++typedef const char* (*CupsGetPPD2)(http_t *http, const char *printer);
+ typedef int (*CupsMarkOptions)(ppd_file_t *ppd, int num_options, cups_option_t *options);
+ typedef ppd_file_t* (*PPDOpenFile)(const char *filename);
+ typedef void (*PPDMarkDefaults)(ppd_file_t *ppd);
+@@ -66,12 +76,24 @@ typedef const char* (*CupsLangEncoding)(
+ typedef int (*CupsAddOption)(const char *name, const char *value, int num_options, cups_option_t **options);
+ typedef int (*CupsTempFd)(char *name, int len);
+ typedef int (*CupsPrintFile)(const char * name, const char * filename, const char * title, int num_options, cups_option_t * options);
++typedef int (*CupsPrintFile2)(http_t *http, const char *name, const char *filename, const char *title, int num_options, cups_option_t *options);
++
++typedef struct
++{
++ cups_dest_t *printers;
++ int num_printers;
++} EnumDestsContext;
+
+ static bool cupsLoaded = false;
+ static int qt_cups_num_printers = 0;
++static cups_dest_t *qt_cups_printers = 0;
++static CupsEnumDests _cupsEnumDests = 0;
++static CupsConnectDest _cupsConnectDest = 0;
++static CupsCopyDest _cupsCopyDest = 0;
+ static CupsGetDests _cupsGetDests = 0;
+ static CupsFreeDests _cupsFreeDests = 0;
+ static CupsGetPPD _cupsGetPPD = 0;
++static CupsGetPPD2 _cupsGetPPD2 = 0;
+ static PPDOpenFile _ppdOpenFile = 0;
+ static PPDMarkDefaults _ppdMarkDefaults = 0;
+ static PPDClose _ppdClose = 0;
+@@ -84,14 +106,35 @@ static CupsLangEncoding _cupsLangEncodin
+ static CupsAddOption _cupsAddOption = 0;
+ static CupsTempFd _cupsTempFd = 0;
+ static CupsPrintFile _cupsPrintFile = 0;
++static CupsPrintFile2 _cupsPrintFile2 = 0;
++
++static int enum_dest_cb (void *user_data, unsigned flags, cups_dest_t *dest)
++{
++ EnumDestsContext *context = (EnumDestsContext *) user_data;
++
++ if ((flags & (CUPS_DEST_FLAGS_UNCONNECTED |
++ CUPS_DEST_FLAGS_REMOVED |
++ CUPS_DEST_FLAGS_ERROR |
++ CUPS_DEST_FLAGS_RESOLVING |
++ CUPS_DEST_FLAGS_CONNECTING |
++ CUPS_DEST_FLAGS_CANCELED)) == 0)
++ context->num_printers = _cupsCopyDest (dest, context->num_printers,
++ &context->printers);
++
++ return 1;
++}
+
+ static void resolveCups()
+ {
+ QLibrary cupsLib(QLatin1String("cups"), 2);
+ if(cupsLib.load()) {
++ _cupsEnumDests = (CupsEnumDests) cupsLib.resolve("cupsEnumDests");
++ _cupsConnectDest = (CupsConnectDest) cupsLib.resolve("cupsConnectDest");
++ _cupsCopyDest = (CupsCopyDest) cupsLib.resolve("cupsCopyDest");
+ _cupsGetDests = (CupsGetDests) cupsLib.resolve("cupsGetDests");
+ _cupsFreeDests = (CupsFreeDests) cupsLib.resolve("cupsFreeDests");
+ _cupsGetPPD = (CupsGetPPD) cupsLib.resolve("cupsGetPPD");
++ _cupsGetPPD2 = (CupsGetPPD2) cupsLib.resolve("cupsGetPPD2");
+ _cupsLangGet = (CupsLangGet) cupsLib.resolve("cupsLangGet");
+ _cupsLangEncoding = (CupsLangEncoding) cupsLib.resolve("cupsLangEncoding");
+ _ppdOpenFile = (PPDOpenFile) cupsLib.resolve("ppdOpenFile");
+@@ -104,14 +147,27 @@ static void resolveCups()
+ _cupsAddOption = (CupsAddOption) cupsLib.resolve("cupsAddOption");
+ _cupsTempFd = (CupsTempFd) cupsLib.resolve("cupsTempFd");
+ _cupsPrintFile = (CupsPrintFile) cupsLib.resolve("cupsPrintFile");
++ _cupsPrintFile2 = (CupsPrintFile2) cupsLib.resolve("cupsPrintFile2");
+
+- if (_cupsGetDests && _cupsFreeDests) {
+- cups_dest_t *printers;
++ if (_cupsEnumDests && _cupsCopyDest &&
++ _cupsConnectDest && _cupsGetPPD2 &&
++ _cupsPrintFile2) {
++ EnumDestsContext context;
++ context.printers = 0;
++ context.num_printers = 0;
++ _cupsEnumDests(0, -1, 0, 0, 0,
++ enum_dest_cb, &context);
++
++ qt_cups_printers = context.printers;
++ qt_cups_num_printers = context.num_printers;
++ } else if (_cupsGetDests && _cupsFreeDests) {
++ cups_dest_t *printers;
+ int num_printers = _cupsGetDests(&printers);
+- if (num_printers)
+- _cupsFreeDests(num_printers, printers);
+- qt_cups_num_printers = num_printers;
+- }
++
++ if (num_printers)
++ _cupsFreeDests(num_printers, printers);
++ qt_cups_num_printers = num_printers;
++ }
+ }
+ cupsLoaded = true;
+ }
+@@ -134,7 +190,15 @@ QCUPSSupport::QCUPSSupport()
+ return;
+
+ // Update the available printer count
+- qt_cups_num_printers = prnCount = _cupsGetDests(&printers);
++ if (qt_cups_printers && _cupsCopyDest) {
++ int i;
++ for (i = 0; i < qt_cups_num_printers; ++i) {
++ prnCount = _cupsCopyDest (&qt_cups_printers[i],
++ prnCount,
++ &printers);
++ }
++ } else
++ qt_cups_num_printers = prnCount = _cupsGetDests(&printers);
+
+ for (int i = 0; i < prnCount; ++i) {
+ if (printers[i].is_default) {
+@@ -188,7 +252,19 @@ const ppd_file_t* QCUPSSupport::setCurre
+ currPPD = 0;
+ page_sizes = 0;
+
+- const char *ppdFile = _cupsGetPPD(printers[index].name);
++ const char *ppdFile = 0;
++ if (_cupsConnectDest && _cupsGetPPD2) {
++ char resource[HTTP_MAX_URI];
++ http_t *http = _cupsConnectDest (&printers[index], 0, -1, 0,
++ resource, sizeof (resource),
++ 0, 0);
++ if (http) {
++ char *name = strrchr (resource, '/');
++ if (name)
++ ppdFile = _cupsGetPPD2 (http, ++name);
++ }
++ } else
++ ppdFile = _cupsGetPPD(printers[index].name);
+
+ if (!ppdFile)
+ return 0;
+@@ -343,7 +419,29 @@ bool QCUPSSupport::printerHasPPD(const c
+ {
+ if (!isAvailable())
+ return false;
+- const char *ppdFile = _cupsGetPPD(printerName);
++
++ const char *ppdFile = 0;
++ if (_cupsConnectDest && _cupsGetPPD2) {
++ int i;
++ for (i = 0; i < prnCount; ++i)
++ if (!strcmp (printers[i].name, printerName))
++ break;
++
++ if (i == prnCount)
++ return false;
++
++ char resource[HTTP_MAX_URI];
++ http_t *http = _cupsConnectDest (&printers[i], 0, -1, 0,
++ resource, sizeof (resource),
++ 0, 0);
++ if (http) {
++ char *name = strrchr (resource, '/');
++ if (name)
++ ppdFile = _cupsGetPPD2 (http, ++name);
++ }
++ } else
++ ppdFile = _cupsGetPPD(printerName);
++
+ if (ppdFile)
+ unlink(ppdFile);
+ return (ppdFile != 0);
+@@ -394,6 +492,26 @@ QPair<int, QString> QCUPSSupport::tempFd
+ int QCUPSSupport::printFile(const char * printerName, const char * filename, const char * title,
+ int num_options, cups_option_t * options)
+ {
++ if (_cupsConnectDest && _cupsPrintFile2) {
++ int i;
++ for (i = 0; i < prnCount; ++i)
++ if (!strcmp (printers[i].name, printerName))
++ break;
++
++ if (i != prnCount) {
++ char resource[HTTP_MAX_URI];
++ http_t *http = _cupsConnectDest (&printers[i], 0, -1, 0,
++ resource, sizeof (resource),
++ 0, 0);
++ if (http) {
++ char *name = strrchr (resource, '/');
++ if (name)
++ return _cupsPrintFile2 (http, ++name, filename, title,
++ num_options, options);
++ }
++ }
++ }
++
+ return _cupsPrintFile(printerName, filename, title, num_options, options);
+ }
+
+diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h
+--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h.cupsEnumDests 2012-11-23 10:09:53.000000000 +0000
++++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qcups_p.h 2013-07-03 15:27:24.733343017 +0100
+@@ -92,7 +92,7 @@ public:
+
+ QStringList options() const;
+
+- static bool printerHasPPD(const char *printerName);
++ bool printerHasPPD(const char *printerName);
+
+ QString unicodeString(const char *s);
+
+diff -up qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp.cupsEnumDests qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp
+--- qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp.cupsEnumDests 2013-07-03 15:27:24.531342277 +0100
++++ qt-everywhere-opensource-src-4.8.4/src/gui/painting/qprinter.cpp 2013-07-03 15:27:24.733343017 +0100
+@@ -844,7 +844,7 @@ void QPrinter::setPrinterName(const QStr
+ if(d->use_default_engine
+ && d->outputFormat == QPrinter::NativeFormat) {
+ if (QCUPSSupport::cupsVersion() >= 10200
+- && QCUPSSupport::printerHasPPD(name.toLocal8Bit().constData()))
++ && QCUPSSupport().printerHasPPD(name.toLocal8Bit().constData()))
+ setOutputFormat(QPrinter::PdfFormat);
+ else
+ setOutputFormat(QPrinter::PostScriptFormat);
diff --git a/improve-cups-support.patch b/qt-everywhere-opensource-src-4.6.2-cups.patch
similarity index 100%
rename from improve-cups-support.patch
rename to qt-everywhere-opensource-src-4.6.2-cups.patch
diff --git a/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch b/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch
new file mode 100644
index 0000000..d4e5924
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch
@@ -0,0 +1,69 @@
+diff -ur qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck/src/gui/kernel/qguieventdispatcher_glib.cpp
+--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-02 04:03:15.000000000 +0200
++++ qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-12-08 22:22:38.000000000 +0100
+@@ -76,7 +76,7 @@
+ GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s);
+ return (XEventsQueued(X11->display, QueuedAfterFlush)
+ || (!(source->flags & QEventLoop::ExcludeUserInputEvents)
+- && !source->d->queuedUserInputEvents.isEmpty()));
++ && source->d && !source->d->queuedUserInputEvents.isEmpty()));
+ }
+
+ static gboolean x11EventSourceCheck(GSource *s)
+@@ -84,7 +84,7 @@
+ GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s);
+ return (XEventsQueued(X11->display, QueuedAfterFlush)
+ || (!(source->flags & QEventLoop::ExcludeUserInputEvents)
+- && !source->d->queuedUserInputEvents.isEmpty()));
++ && source->d && !source->d->queuedUserInputEvents.isEmpty()));
+ }
+
+ static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointer user_data)
+@@ -95,7 +95,7 @@
+ do {
+ XEvent event;
+ if (!(source->flags & QEventLoop::ExcludeUserInputEvents)
+- && !source->d->queuedUserInputEvents.isEmpty()) {
++ && source->d && !source->d->queuedUserInputEvents.isEmpty()) {
+ // process a pending user input event
+ event = source->d->queuedUserInputEvents.takeFirst();
+ } else if (XEventsQueued(X11->display, QueuedAlready)) {
+@@ -112,7 +112,8 @@
+ case XKeyRelease:
+ case EnterNotify:
+ case LeaveNotify:
+- source->d->queuedUserInputEvents.append(event);
++ if (source->d)
++ source->d->queuedUserInputEvents.append(event);
+ continue;
+
+ case ClientMessage:
+@@ -127,7 +128,8 @@
+ break;
+ }
+ }
+- source->d->queuedUserInputEvents.append(event);
++ if (source->d)
++ source->d->queuedUserInputEvents.append(event);
+ continue;
+
+ default:
+@@ -140,7 +142,7 @@
+ }
+
+ // send through event filter
+- if (source->q->filterEvent(&event))
++ if (source->q && source->q->filterEvent(&event))
+ continue;
+
+ if (qApp->x11ProcessEvent(&event) == 1)
+@@ -152,7 +154,8 @@
+
+ out:
+
+- source->d->runTimersOnceWithNormalPriority();
++ if (source->d)
++ source->d->runTimersOnceWithNormalPriority();
+
+ if (callback)
+ callback(user_data);
diff --git a/qt-everywhere-opensource-src-4.8.0-QTBUG-22037.patch b/qt-everywhere-opensource-src-4.8.0-QTBUG-22037.patch
new file mode 100644
index 0000000..4279ce2
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.0-QTBUG-22037.patch
@@ -0,0 +1,41 @@
+diff -up qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037 qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h
+--- qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h.QTBUG-22037 2011-10-03 22:44:32.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.0/src/corelib/tools/qlist.h 2011-10-15 14:25:52.238694974 -0500
+@@ -769,26 +769,18 @@ Q_OUTOFLINE_TEMPLATE void QList<T>::clea
+ template <typename T>
+ Q_OUTOFLINE_TEMPLATE int QList<T>::removeAll(const T &_t)
+ {
+- int index = indexOf(_t);
+- if (index == -1)
+- return 0;
+-
++ detachShared();
+ const T t = _t;
+- detach();
+-
+- Node *i = reinterpret_cast<Node *>(p.at(index));
+- Node *e = reinterpret_cast<Node *>(p.end());
+- Node *n = i;
+- node_destruct(i);
+- while (++i != e) {
+- if (i->t() == t)
+- node_destruct(i);
+- else
+- *n++ = *i;
+- }
+-
+- int removedCount = e - n;
+- d->end -= removedCount;
++ int removedCount=0, i=0;
++ Node *n;
++ while (i < p.size())
++ if ((n = reinterpret_cast<Node *>(p.at(i)))->t() == t) {
++ node_destruct(n);
++ p.remove(i);
++ ++removedCount;
++ } else {
++ ++i;
++ }
+ return removedCount;
+ }
+
diff --git a/qt-everywhere-opensource-src-4.8.0-tp-qtreeview-kpackagekit-crash.patch b/qt-everywhere-opensource-src-4.8.0-tp-qtreeview-kpackagekit-crash.patch
new file mode 100644
index 0000000..947f758
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.0-tp-qtreeview-kpackagekit-crash.patch
@@ -0,0 +1,12 @@
+diff -up qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp.qtreeview-kpackagekit-crash qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp
+--- qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp.qtreeview-kpackagekit-crash 2011-05-23 12:26:21.000000000 +0200
++++ qt-everywhere-opensource-src-4.8.0-tp/src/gui/itemviews/qtreeview.cpp 2011-05-25 13:24:33.137315194 +0200
+@@ -3215,7 +3215,7 @@ int QTreeViewPrivate::itemHeight(int ite
+ return defaultItemHeight;
+ if (viewItems.isEmpty())
+ return 0;
+- const QModelIndex &index = viewItems.at(item).index;
++ QModelIndex index = viewItems.at(item).index;
+ if (!index.isValid())
+ return 0;
+ int height = viewItems.at(item).height;
diff --git a/fix-crash-in-assistant.patch b/qt-everywhere-opensource-src-4.8.2--assistant-crash.patch
similarity index 51%
rename from fix-crash-in-assistant.patch
rename to qt-everywhere-opensource-src-4.8.2--assistant-crash.patch
index 4246e05..f0a41a4 100644
--- a/fix-crash-in-assistant.patch
+++ b/qt-everywhere-opensource-src-4.8.2--assistant-crash.patch
@@ -1,11 +1,13 @@
---- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-26 17:37:47.334536023 +0000
-+++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp~ 2012-06-26 17:37:08.531487286 +0000
-@@ -944,8 +944,7 @@
+diff -up qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp.me qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp
+--- qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp.me 2012-06-19 12:52:22.740180410 +0200
++++ qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant/mainwindow.cpp 2012-06-19 12:52:51.953194103 +0200
+@@ -944,8 +944,7 @@ void MainWindow::updateApplicationFont()
if (helpEngine.usesAppFont())
font = helpEngine.appFont();
-
+
- const QWidgetList &widgets = qApp->allWidgets();
- foreach (QWidget* widget, widgets)
+ foreach (QWidget* widget, QApplication::allWidgets())
widget->setFont(font);
}
+
diff --git a/qt-everywhere-opensource-src-4.8.3-qdbusconnection_no_debug.patch b/qt-everywhere-opensource-src-4.8.3-qdbusconnection_no_debug.patch
new file mode 100644
index 0000000..dd3a5a0
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.3-qdbusconnection_no_debug.patch
@@ -0,0 +1,14 @@
+diff -up qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp
+--- qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug.patch 2012-09-06 02:33:44.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.3/src/dbus/qdbusconnection.cpp 2012-09-11 08:55:29.854026815 -0500
+@@ -1109,8 +1109,10 @@ public:
+ // make sure this connection is running on the main thread
+ QCoreApplication *instance = QCoreApplication::instance();
+ if (!instance) {
++#ifndef QT_NO_DEBUG
+ qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
+ type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
++#endif
+ } else if (QDBusConnectionPrivate::d(*this)) {
+ QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
+ }
diff --git a/qt-everywhere-opensource-src-4.8.4-qmake_pkgconfig_requires_private.patch b/qt-everywhere-opensource-src-4.8.4-qmake_pkgconfig_requires_private.patch
new file mode 100644
index 0000000..0494c81
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.4-qmake_pkgconfig_requires_private.patch
@@ -0,0 +1,16 @@
+diff -up qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp.qmake_pkgconfig_requires_private qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp
+--- qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp.qmake_pkgconfig_requires_private 2012-11-23 04:11:21.000000000 -0600
++++ qt-everywhere-opensource-src-4.8.4/qmake/generators/makefile.cpp 2013-02-11 07:36:36.192779528 -0600
+@@ -3293,6 +3293,12 @@ MakefileGenerator::writePkgConfigFile()
+ t << "Requires: " << requires << endl;
+ }
+
++ // requires.private
++ const QString requires_private = project->values("QMAKE_PKGCONFIG_REQUIRES_PRIVATE").join(" ");
++ if (!requires_private.isEmpty()) {
++ t << "Requires.private: " << requires_private << endl;
++ }
++
+ t << endl;
+ }
+
diff --git a/qt-everywhere-opensource-src-4.8.5-QTBUG-14467.patch b/qt-everywhere-opensource-src-4.8.5-QTBUG-14467.patch
new file mode 100644
index 0000000..81d74ff
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.5-QTBUG-14467.patch
@@ -0,0 +1,24 @@
+diff -up qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf.QTBUG-14467 qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf
+--- qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf.QTBUG-14467 2013-05-30 16:19:17.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.5/mkspecs/features/qt_functions.prf 2013-06-09 11:53:45.709773603 -0500
+@@ -72,7 +72,7 @@ defineTest(qtAddLibrary) {
+ }
+ isEmpty(LINKAGE) {
+ if(!debug_and_release|build_pass):CONFIG(debug, debug|release) {
+- win32:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}d
++ win32:LINKAGE = -l$${LIB_NAME}d$${QT_LIBINFIX}
+ mac:LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}_debug
+ }
+ isEmpty(LINKAGE):LINKAGE = -l$${LIB_NAME}$${QT_LIBINFIX}
+diff -up qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf.QTBUG-14467 qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf
+--- qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf.QTBUG-14467 2013-05-30 16:19:17.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.5/mkspecs/features/win32/windows.prf 2013-06-09 11:53:45.710773593 -0500
+@@ -6,7 +6,7 @@ contains(TEMPLATE, ".*app"){
+
+ qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
+ isEqual(entryLib, -lqtmain): {
+- CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
++ CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}d$${QT_LIBINFIX}
+ else: QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}
+ } else {
+ QMAKE_LIBS += $${entryLib}
diff --git a/qt-everywhere-opensource-src-4.8.5-tds_no_strict_aliasing.patch b/qt-everywhere-opensource-src-4.8.5-tds_no_strict_aliasing.patch
new file mode 100644
index 0000000..2deeb51
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.5-tds_no_strict_aliasing.patch
@@ -0,0 +1,12 @@
+diff -up qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri.tds_no_strict_aliasing qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri
+--- qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri.tds_no_strict_aliasing 2013-06-09 11:57:49.198291245 -0500
++++ qt-everywhere-opensource-src-4.8.5/src/sql/drivers/tds/qsql_tds.pri 2013-06-09 12:01:24.120100371 -0500
+@@ -1,6 +1,8 @@
+ HEADERS += $$PWD/qsql_tds.h
+ SOURCES += $$PWD/qsql_tds.cpp
+
++*-g++*: QMAKE_CXXFLAGS += -fno-strict-aliasing
++
+ unix|win32-g++*: {
+ LIBS += $$QT_LFLAGS_TDS
+ !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
diff --git a/qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch b/qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch
new file mode 100644
index 0000000..b6f1c6f
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.6-QTBUG-22829.patch
@@ -0,0 +1,16 @@
+diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp
+--- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-03-16 13:20:43.145899869 -0500
+@@ -188,8 +188,11 @@ int runMoc(int _argc, char **_argv)
+ pp.macros["Q_MOC_RUN"];
+ pp.macros["__cplusplus"];
+
+- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829
++ // Workaround a bugs while parsing some boost headers. See QTBUG-22829
+ pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"];
++ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"];
++ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"];
++ pp.macros["BOOST_TYPE_TRAITS_HPP"];
+
+ QByteArray filename;
+ QByteArray output;
diff --git a/qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch b/qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch
new file mode 100644
index 0000000..aaa15cb
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.7-alsa-1.1.patch
@@ -0,0 +1,12 @@
+diff -up qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp
+--- qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp.than 2016-02-10 16:31:02.450152334 +0100
++++ qt-everywhere-opensource-src-4.8.7/config.tests/unix/alsa/alsatest.cpp 2016-02-10 16:31:51.495307579 +0100
+@@ -40,7 +40,7 @@
+ ****************************************************************************/
+
+ #include <alsa/asoundlib.h>
+-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
++#if(!(SND_LIB_MAJOR == 1 && (SND_LIB_MINOR > 0 || SND_LIB_SUBMINOR >= 10)))
+ #error "Alsa version found too old, require >= 1.0.10"
+ #endif
+
diff --git a/qt-everywhere-opensource-src-4.8.7-gcc6.patch b/qt-everywhere-opensource-src-4.8.7-gcc6.patch
new file mode 100644
index 0000000..aaf1c49
--- /dev/null
+++ b/qt-everywhere-opensource-src-4.8.7-gcc6.patch
@@ -0,0 +1,35 @@
+diff -up qt-everywhere-opensource-src-4.8.7/configure.gcc6 qt-everywhere-opensource-src-4.8.7/configure
+--- qt-everywhere-opensource-src-4.8.7/configure.gcc6 2016-04-15 07:04:19.430268222 -0500
++++ qt-everywhere-opensource-src-4.8.7/configure 2016-04-15 07:05:22.157568689 -0500
+@@ -7744,7 +7744,7 @@ case "$XPLATFORM" in
+ *-g++*)
+ # Check gcc's version
+ case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
+- 5*|4*|3.4*)
++ 8*|7*|6*|5*|4*|3.4*)
+ ;;
+ 3.3*)
+ canBuildWebKit="no"
+@@ -8060,7 +8060,7 @@ g++*)
+ 3.*)
+ COMPILER_VERSION="3.*"
+ ;;
+- 5*|4.*)
++ 8*|7*|6*|5*|4.*)
+ COMPILER_VERSION="4"
+ ;;
+ *)
+diff -up qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h
+--- qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h.gcc6 2015-05-07 09:14:48.000000000 -0500
++++ qt-everywhere-opensource-src-4.8.7/src/xmlpatterns/api/qcoloroutput_p.h 2016-04-15 07:04:19.431268227 -0500
+@@ -70,8 +70,8 @@ namespace QPatternist
+ ForegroundShift = 10,
+ BackgroundShift = 20,
+ SpecialShift = 20,
+- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
+- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
++ ForegroundMask = 0x1f << ForegroundShift,
++ BackgroundMask = 0x7 << BackgroundShift
+ };
+
+ public:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qt4.git/commitdiff/08c7dce551992ba3f2798e592ae8e6fe4974fc99
More information about the pld-cvs-commit
mailing list