Merge branch 'master' into epel7

This commit is contained in:
Rex Dieter 2016-06-14 15:09:40 -05:00
commit d5e2722528
21 changed files with 410 additions and 1762 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/qtbase-opensource-src-5.6.0-rc.tar.xz
/sources
/qtbase-opensource-src-5.6.0.tar.xz
/qtbase-opensource-src-5.6.1.tar.xz

View File

@ -0,0 +1,37 @@
From 46f1c4c86bbfe7b6917907700bec998626ad4a8b Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Wed, 11 May 2016 18:42:24 +0300
Subject: [PATCH 001/178] xcb: Properly interpret data.l[0] field of XdndStatus
message
The standard https://freedesktop.org/wiki/Specifications/XDND/
states: "In order for the proxy window to behave correctly, the
appropriate field of the client messages, window or data.l[0],
must contain the ID of the window in which the mouse is located,
not the proxy window that is receiving the messages."
So compare it with the current target window instead of the
current proxy window.
Change-Id: Ie31fd3aeadebcf5a9be7b9a9194f35a4ec7bdebb
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbdrag.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 6fa5dfa..f93e420 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -829,7 +829,7 @@ void QXcbDrag::handle_xdnd_status(const xcb_client_message_event_t *event)
DEBUG("xdndHandleStatus");
waiting_for_status = false;
// ignore late status messages
- if (event->data.data32[0] && event->data.data32[0] != current_proxy_target)
+ if (event->data.data32[0] && event->data.data32[0] != current_target)
return;
const bool dropPossible = event->data.data32[1];
--
2.7.4

View File

@ -0,0 +1,31 @@
From 2852a8b87e3a8ed95b72d26b0e180b7fd4491cf3 Mon Sep 17 00:00:00 2001
From: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Date: Fri, 26 Feb 2016 11:53:01 -0800
Subject: [PATCH 011/178] XCB: Auto-detect xcb-glx also with xcb-qt
Task-number: QTBUG-43784
Change-Id: Iaa0388e34900f6241db8cd864caed4fb6fc32819
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
---
configure | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/configure b/configure
index ce5b9c2..a481981 100755
--- a/configure
+++ b/configure
@@ -5555,6 +5555,11 @@ if [ "$CFG_XCB" != "no" ]; then
if [ "$CFG_XCB" = "qt" ]; then
QT_CONFIG="$QT_CONFIG xcb-qt"
+
+ if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
+ CFG_XCB_GLX=yes
+ QT_CONFIG="$QT_CONFIG xcb-glx"
+ fi
else
CFG_XCB="system"
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
--
2.7.4

View File

@ -0,0 +1,78 @@
From 1108291e1a2e7de23440c2b36b2fd31010ae3f51 Mon Sep 17 00:00:00 2001
From: Urs Fleisch <ufleisch@users.sourceforge.net>
Date: Tue, 3 May 2016 20:01:01 +0200
Subject: [PATCH 032/178] xcb: Fix drop of text/uri-list and text/html.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When dropping URLs from Firefox or Chrome, the contents are encoded as
UTF16, but not correctly decoded. Moreover, the special handling of
"text/x-moz-url" drops does not work because this format is converted to
"text/uri-list" before. This fixes the handling for URL list and also
for UTF16 "text/html".
Task-number: QTBUG-47981
Change-Id: I1153f21ede07b2bfe4d104e0fe8bc8487ec5c165
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbmime.cpp | 42 +++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 11 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index eeac561..cef2210 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -182,17 +182,37 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a,
a == connection->atom(QXcbAtom::TEXT))
return QString::fromLatin1(data);
}
-
- // special case for uri types
- if (format == QLatin1String("text/uri-list")) {
- if (atomName == QLatin1String("text/x-moz-url")) {
- // we expect this as utf16 <url><space><title>
- // the first part is a url that should only contain ascci char
- // so it should be safe to check that the second char is 0
- // to verify that it is utf16
- if (data.size() > 1 && data.at(1) == 0)
- return QString::fromRawData((const QChar *)data.constData(),
- data.size() / 2).split(QLatin1Char('\n')).first().toLatin1();
+ // If data contains UTF16 text, convert it to a string.
+ // Firefox uses UTF16 without BOM for text/x-moz-url, "text/html",
+ // Google Chrome uses UTF16 without BOM for "text/x-moz-url",
+ // UTF16 with BOM for "text/html".
+ if ((format == QLatin1String("text/html") || format == QLatin1String("text/uri-list"))
+ && data.size() > 1) {
+ const quint8 byte0 = data.at(0);
+ const quint8 byte1 = data.at(1);
+ if ((byte0 == 0xff && byte1 == 0xfe) || (byte0 == 0xfe && byte1 == 0xff)
+ || (byte0 != 0 && byte1 == 0) || (byte0 == 0 && byte1 != 0)) {
+ const QString str = QString::fromUtf16(
+ reinterpret_cast<const ushort *>(data.constData()), data.size() / 2);
+ if (!str.isNull()) {
+ if (format == QLatin1String("text/uri-list")) {
+ const QStringList urls = str.split(QLatin1Char('\n'));
+ QList<QVariant> list;
+ foreach (const QString &s, urls) {
+ const QUrl url(s.trimmed());
+ if (url.isValid())
+ list.append(url);
+ }
+ // We expect "text/x-moz-url" as <url><space><title>.
+ // The atomName variable is not used because mimeAtomToString()
+ // converts "text/x-moz-url" to "text/uri-list".
+ if (!list.isEmpty() && connection->atomName(a) == "text/x-moz-url")
+ return list.first();
+ return list;
+ } else {
+ return str;
+ }
+ }
}
}
--
2.7.4

View File

@ -0,0 +1,58 @@
From f162e29acca99aaab173fb323d112aad9ec6c2b5 Mon Sep 17 00:00:00 2001
From: Urs Fleisch <ufleisch@users.sourceforge.net>
Date: Wed, 4 May 2016 19:47:16 +0200
Subject: [PATCH 033/178] xcb: Fix dropping URL on Firefox window.
When a URL is dropped on a Firefox window, the "text/x-moz-url" data
takes precedence over the "text/uri-list". The "text/x-moz-url" is
interpreted as UTF16, however, the data from Qt 5 applications is not
in the correct format. The code to create correct UTF16 data exists,
but it is not called for two reasons: The atomName will never be
"text/x-moz-url" because it is changed to "text/uri-list" by
mimeAtomToString() and the InternalMimeData::hasFormatHelper() case is
already handled above and the else part will never be considered.
This patch fixes the check and brings it into the right order.
Task-number: QTBUG-49947
Change-Id: I5ebd31914cc6c1417c513c1ff09e0e858a16915d
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbmime.cpp | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
index cef2210..7fea068 100644
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
@@ -111,17 +111,18 @@ bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeDa
QString atomName = mimeAtomToString(connection, a);
if (QInternalMimeData::hasFormatHelper(atomName, mimeData)) {
*data = QInternalMimeData::renderDataHelper(atomName, mimeData);
- if (atomName == QLatin1String("application/x-color"))
+ // mimeAtomToString() converts "text/x-moz-url" to "text/uri-list",
+ // so QXcbConnection::atomName() has to be used.
+ if (atomName == QLatin1String("text/uri-list")
+ && connection->atomName(a) == "text/x-moz-url") {
+ const QByteArray uri = data->split('\n').first();
+ QString mozUri = QString::fromLatin1(uri, uri.size());
+ mozUri += QLatin1Char('\n');
+ *data = QByteArray(reinterpret_cast<const char *>(mozUri.utf16()),
+ mozUri.length() * 2);
+ } else if (atomName == QLatin1String("application/x-color"))
*dataFormat = 16;
ret = true;
- } else if (atomName == QLatin1String("text/x-moz-url") &&
- QInternalMimeData::hasFormatHelper(QLatin1String("text/uri-list"), mimeData)) {
- QByteArray uri = QInternalMimeData::renderDataHelper(
- QLatin1String("text/uri-list"), mimeData).split('\n').first();
- QString mozUri = QString::fromLatin1(uri, uri.size());
- mozUri += QLatin1Char('\n');
- *data = QByteArray(reinterpret_cast<const char *>(mozUri.utf16()), mozUri.length() * 2);
- ret = true;
} else if ((a == XCB_ATOM_PIXMAP || a == XCB_ATOM_BITMAP) && mimeData->hasImage()) {
ret = true;
}
--
2.7.4

View File

@ -1,178 +0,0 @@
From 8dc55367ca3993f465f270ef79c2cb212d821d0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl>
Date: Mon, 8 Feb 2016 15:02:17 +0100
Subject: [PATCH 058/328] QtGui: Avoid rgba64->rgba32 conversion on every pixel
in gradient
Convert rgba64 color table to a new rgb32 color table only once. Use
this cache when required.
This patch can 2x speed up gradient painting using 32bit color format.
Task-number: QTBUG-50930
Change-Id: I9212e01e397c2e0127cdf3070cc49880a2d8df88
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
---
src/gui/painting/qdrawhelper.cpp | 4 ++--
src/gui/painting/qdrawhelper_p.h | 9 ++++----
src/gui/painting/qpaintengine_raster.cpp | 38 ++++++++++++++++++++++++--------
3 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 28c7099..f0e5810 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -3433,13 +3433,13 @@ static SourceFetchProc64 sourceFetch64[NBlendTypes][QImage::NImageFormats] = {
static uint qt_gradient_pixel_fixed(const QGradientData *data, int fixed_pos)
{
int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS;
- return data->colorTable[qt_gradient_clamp(data, ipos)].toArgb32();
+ return data->colorTable32[qt_gradient_clamp(data, ipos)];
}
static const QRgba64& qt_gradient_pixel64_fixed(const QGradientData *data, int fixed_pos)
{
int ipos = (fixed_pos + (FIXPT_SIZE / 2)) >> FIXPT_BITS;
- return data->colorTable[qt_gradient_clamp(data, ipos)];
+ return data->colorTable64[qt_gradient_clamp(data, ipos)];
}
static void QT_FASTCALL getLinearGradientValues(LinearGradientValues *v, const QSpanData *data)
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 1ff19f4..ff98d18 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -268,7 +268,8 @@ struct QGradientData
#define GRADIENT_STOPTABLE_SIZE 1024
#define GRADIENT_STOPTABLE_SIZE_SHIFT 10
- QRgba64* colorTable; //[GRADIENT_STOPTABLE_SIZE];
+ const QRgba64 *colorTable64; //[GRADIENT_STOPTABLE_SIZE];
+ const QRgb *colorTable32; //[GRADIENT_STOPTABLE_SIZE];
uint alphaColor : 1;
};
@@ -376,13 +377,13 @@ static inline uint qt_gradient_clamp(const QGradientData *data, int ipos)
static inline uint qt_gradient_pixel(const QGradientData *data, qreal pos)
{
int ipos = int(pos * (GRADIENT_STOPTABLE_SIZE - 1) + qreal(0.5));
- return data->colorTable[qt_gradient_clamp(data, ipos)].toArgb32();
+ return data->colorTable32[qt_gradient_clamp(data, ipos)];
}
static inline const QRgba64& qt_gradient_pixel64(const QGradientData *data, qreal pos)
{
int ipos = int(pos * (GRADIENT_STOPTABLE_SIZE - 1) + qreal(0.5));
- return data->colorTable[qt_gradient_clamp(data, ipos)];
+ return data->colorTable64[qt_gradient_clamp(data, ipos)];
}
static inline qreal qRadialDeterminant(qreal a, qreal b, qreal c)
@@ -550,7 +551,7 @@ public:
delta_det4_vec.v = Simd::v_add(delta_det4_vec.v, v_delta_delta_det16); \
b_vec.v = Simd::v_add(b_vec.v, v_delta_b4); \
for (int i = 0; i < 4; ++i) \
- *buffer++ = (extended_mask | v_buffer_mask.i[i]) & data->gradient.colorTable[index_vec.i[i]].toArgb32(); \
+ *buffer++ = (extended_mask | v_buffer_mask.i[i]) & data->gradient.colorTable32[index_vec.i[i]]; \
}
#define FETCH_RADIAL_LOOP(FETCH_RADIAL_LOOP_CLAMP) \
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 05ccff5..fb44a7a 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -4138,7 +4138,8 @@ class QGradientCache
{
inline CacheInfo(QGradientStops s, int op, QGradient::InterpolationMode mode) :
stops(qMove(s)), opacity(op), interpolationMode(mode) {}
- QRgba64 buffer[GRADIENT_STOPTABLE_SIZE];
+ QRgba64 buffer64[GRADIENT_STOPTABLE_SIZE];
+ QRgb buffer32[GRADIENT_STOPTABLE_SIZE];
QGradientStops stops;
int opacity;
QGradient::InterpolationMode interpolationMode;
@@ -4147,7 +4148,9 @@ class QGradientCache
typedef QMultiHash<quint64, CacheInfo> QGradientColorTableHash;
public:
- inline const QRgba64 *getBuffer(const QGradient &gradient, int opacity) {
+ typedef QPair<const QRgb *, const QRgba64 *> ColorBufferPair;
+
+ inline ColorBufferPair getBuffer(const QGradient &gradient, int opacity) {
quint64 hash_val = 0;
const QGradientStops stops = gradient.stops();
@@ -4163,7 +4166,8 @@ public:
do {
const CacheInfo &cache_info = it.value();
if (cache_info.stops == stops && cache_info.opacity == opacity && cache_info.interpolationMode == gradient.interpolationMode())
- return cache_info.buffer;
+ return qMakePair(reinterpret_cast<const QRgb *>(cache_info.buffer32),
+ reinterpret_cast<const QRgba64 *>(cache_info.buffer64));
++it;
} while (it != cache.constEnd() && it.key() == hash_val);
// an exact match for these stops and opacity was not found, create new cache
@@ -4177,14 +4181,18 @@ protected:
inline void generateGradientColorTable(const QGradient& g,
QRgba64 *colorTable,
int size, int opacity) const;
- QRgba64 *addCacheElement(quint64 hash_val, const QGradient &gradient, int opacity) {
+ ColorBufferPair addCacheElement(quint64 hash_val, const QGradient &gradient, int opacity) {
if (cache.size() == maxCacheSize()) {
// may remove more than 1, but OK
cache.erase(cache.begin() + (qrand() % maxCacheSize()));
}
CacheInfo cache_entry(gradient.stops(), opacity, gradient.interpolationMode());
- generateGradientColorTable(gradient, cache_entry.buffer, paletteSize(), opacity);
- return cache.insert(hash_val, cache_entry).value().buffer;
+ generateGradientColorTable(gradient, cache_entry.buffer64, paletteSize(), opacity);
+ for (int i = 0; i < GRADIENT_STOPTABLE_SIZE; ++i)
+ cache_entry.buffer32[i] = cache_entry.buffer64[i].toArgb32();
+ CacheInfo &cache_value = cache.insert(hash_val, cache_entry).value();
+ return qMakePair(reinterpret_cast<const QRgb *>(cache_value.buffer32),
+ reinterpret_cast<const QRgba64 *>(cache_value.buffer64));
}
QGradientColorTableHash cache;
@@ -4418,7 +4426,11 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
type = LinearGradient;
const QLinearGradient *g = static_cast<const QLinearGradient *>(brush.gradient());
gradient.alphaColor = !brush.isOpaque() || alpha != 256;
- gradient.colorTable = const_cast<QRgba64*>(qt_gradient_cache()->getBuffer(*g, alpha));
+
+ QGradientCache::ColorBufferPair colorBuffers = qt_gradient_cache()->getBuffer(*g, alpha);
+ gradient.colorTable64 = colorBuffers.second;
+ gradient.colorTable32 = colorBuffers.first;
+
gradient.spread = g->spread();
QLinearGradientData &linearData = gradient.linear;
@@ -4435,7 +4447,11 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
type = RadialGradient;
const QRadialGradient *g = static_cast<const QRadialGradient *>(brush.gradient());
gradient.alphaColor = !brush.isOpaque() || alpha != 256;
- gradient.colorTable = const_cast<QRgba64*>(qt_gradient_cache()->getBuffer(*g, alpha));
+
+ QGradientCache::ColorBufferPair colorBuffers = qt_gradient_cache()->getBuffer(*g, alpha);
+ gradient.colorTable64 = colorBuffers.second;
+ gradient.colorTable32 = colorBuffers.first;
+
gradient.spread = g->spread();
QRadialGradientData &radialData = gradient.radial;
@@ -4456,7 +4472,11 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
type = ConicalGradient;
const QConicalGradient *g = static_cast<const QConicalGradient *>(brush.gradient());
gradient.alphaColor = !brush.isOpaque() || alpha != 256;
- gradient.colorTable = const_cast<QRgba64*>(qt_gradient_cache()->getBuffer(*g, alpha));
+
+ QGradientCache::ColorBufferPair colorBuffers = qt_gradient_cache()->getBuffer(*g, alpha);
+ gradient.colorTable64 = colorBuffers.second;
+ gradient.colorTable32 = colorBuffers.first;
+
gradient.spread = QGradient::RepeatSpread;
QConicalGradientData &conicalData = gradient.conical;
--
1.9.3

View File

@ -1,78 +0,0 @@
From a3b8e355fc17783a5d4badfb9ad50247655000cd Mon Sep 17 00:00:00 2001
From: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
Date: Fri, 12 Feb 2016 15:31:07 +0300
Subject: [PATCH 076/122] QListView: fix skipping indexes in selectedIndexes().
Remove spurious increment of i.
Task-number: QTBUG-51086
Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
---
src/widgets/itemviews/qlistview.cpp | 2 +-
.../widgets/itemviews/qlistview/tst_qlistview.cpp | 28 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
index 9c79509..a17d89e 100644
--- a/src/widgets/itemviews/qlistview.cpp
+++ b/src/widgets/itemviews/qlistview.cpp
@@ -1437,7 +1437,7 @@ QModelIndexList QListView::selectedIndexes() const
return QModelIndexList();
QModelIndexList viewSelected = d->selectionModel->selectedIndexes();
- for (int i = 0; i < viewSelected.count(); ++i) {
+ for (int i = 0; i < viewSelected.count();) {
const QModelIndex &index = viewSelected.at(i);
if (!isIndexHidden(index) && index.parent() == d->root && index.column() == d->column)
++i;
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 5b206af..3cf9f7f 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -152,6 +152,7 @@ private slots:
void taskQTBUG_39902_mutualScrollBars_data();
void taskQTBUG_39902_mutualScrollBars();
void horizontalScrollingByVerticalWheelEvents();
+ void taskQTBUG_51086_skippingIndexesInSelectedIndexes();
};
// Testing get/set functions
@@ -2493,5 +2494,32 @@ void tst_QListView::horizontalScrollingByVerticalWheelEvents()
QVERIFY(lv.verticalScrollBar()->value() > vValue);
}
+void tst_QListView::taskQTBUG_51086_skippingIndexesInSelectedIndexes()
+{
+ // simple way to get access to selectedIndexes()
+ class QListViewWithPublicSelectedIndexes : public QListView
+ {
+ public:
+ using QListView::selectedIndexes;
+ };
+
+ QStandardItemModel data(10, 1);
+ QItemSelectionModel selections(&data);
+ QListViewWithPublicSelectedIndexes list;
+ list.setModel(&data);
+ list.setSelectionModel(&selections);
+
+ list.setRowHidden(7, true);
+ list.setRowHidden(8, true);
+
+ for (int i = 0, count = data.rowCount(); i < count; ++i)
+ selections.select(data.index(i, 0), QItemSelectionModel::Select);
+
+ const QModelIndexList indexes = list.selectedIndexes();
+
+ QVERIFY(!indexes.contains(data.index(7, 0)));
+ QVERIFY(!indexes.contains(data.index(8, 0)));
+}
+
QTEST_MAIN(tst_QListView)
#include "tst_qlistview.moc"
--
2.5.0

View File

@ -1,28 +0,0 @@
From 9868d8af8316c01f28255110c28e11344ea6f7a5 Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@digia.com>
Date: Thu, 18 Feb 2016 14:06:02 +0100
Subject: [PATCH 101/328] xcb: include <cmath>
Fix trouble compiling with gcc 4.4.7 on Centos 6
Change-Id: Id81bd570e896507a07388257c4f75f80b4b468fd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
---
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 969b6de..81cdaa5 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -38,6 +38,7 @@
#include "qtouchdevice.h"
#include <qpa/qwindowsysteminterface.h>
#include <QDebug>
+#include <cmath>
#ifdef XCB_USE_XINPUT2
--
1.9.3

View File

@ -0,0 +1,37 @@
From 76810e1495b65a09e9abd6164639e0caf34d61b8 Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Date: Fri, 20 May 2016 14:52:18 +0200
Subject: [PATCH 148/178] xcb: Disable GLX pbuffers with Chromium in VMs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I474e4a4ce424a92b46381eb26aeda811ed059819
Task-number: QTCREATORBUG-16252
Task-number: QTCREATORBUG-14937
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
---
.../platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
index a3a8aa2..55d0ff3 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
@@ -201,8 +201,10 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO
display = static_cast<Display *>(m_connection->xlib_display());
#endif
const char *glxvendor = glXGetClientString(display, GLX_VENDOR);
- if (glxvendor && !strcmp(glxvendor, "ATI"))
- glxPbufferUsable = false;
+ if (glxvendor) {
+ if (!strcmp(glxvendor, "ATI") || !strcmp(glxvendor, "Chromium"))
+ glxPbufferUsable = false;
+ }
}
if (glxPbufferUsable)
return new QGLXPbuffer(surface);
--
2.7.4

View File

@ -0,0 +1,64 @@
From 4762fabce16c611f12542a48b0dd31b3cec8e530 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl>
Date: Thu, 14 Apr 2016 13:20:23 +0200
Subject: [PATCH 155/178] xcb: Fix transient parent and "Qt::Window" flag
Don't set transient parent property when Qt::Window flag is set.
Delete transient parent property if a window doesn't have a transient parent.
Force setting standard window flags for Qt::Window only if there are no other
flags.
Amends 98c10a02c5b77e023471ad6993dc66b013889cfb
Task-number: QTBUG-52550
Change-Id: I68ee715b632487e9dd0e7ffbbfc0c2cdd0f0e151
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
---
src/plugins/platforms/xcb/qxcbwindow.cpp | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 429ba8d..0c2f0d7 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -821,9 +821,9 @@ void QXcbWindow::show()
propagateSizeHints();
// update WM_TRANSIENT_FOR
- const QWindow *tp = window()->transientParent();
- if (isTransient(window()) || tp != 0) {
- xcb_window_t transientXcbParent = 0;
+ xcb_window_t transientXcbParent = 0;
+ if (isTransient(window())) {
+ const QWindow *tp = window()->transientParent();
if (tp && tp->handle())
transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
// Default to client leader if there is no transient parent, else modal dialogs can
@@ -836,6 +836,8 @@ void QXcbWindow::show()
1, &transientXcbParent));
}
}
+ if (!transientXcbParent)
+ Q_XCB_CALL(xcb_delete_property(xcb_connection(), m_window, XCB_ATOM_WM_TRANSIENT_FOR));
// update _MOTIF_WM_HINTS
updateMotifWmHintsBeforeMap();
@@ -1195,9 +1197,11 @@ void QXcbWindow::setMotifWindowFlags(Qt::WindowFlags flags)
mwmhints.flags |= MWM_HINTS_DECORATIONS;
bool customize = flags & Qt::CustomizeWindowHint;
- if (type == Qt::Window && !customize)
- flags |= Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
-
+ if (type == Qt::Window && !customize) {
+ const Qt::WindowFlags defaultFlags = Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
+ if (!(flags & defaultFlags))
+ flags |= defaultFlags;
+ }
if (!(flags & Qt::FramelessWindowHint) && !(customize && !(flags & Qt::WindowTitleHint))) {
mwmhints.decorations |= MWM_DECOR_BORDER;
mwmhints.decorations |= MWM_DECOR_RESIZEH;
--
2.7.4

View File

@ -1,103 +0,0 @@
From 4f577051676ad8ff161d481030f016d0c6bb324f Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Sat, 5 Mar 2016 00:34:01 +0100
Subject: [PATCH 177/328] Fix GCC 6 -Wunused-functions warnings
GCC 6 is able to identify member functions that are unused.
Remove them.
Change-Id: Ic77548164b38a1cd3c957d2c57a5bccb979bc02e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
---
src/gui/painting/qpathclipper.cpp | 8 --------
src/widgets/dialogs/qcolordialog.cpp | 15 ---------------
src/widgets/widgets/qcalendarwidget.cpp | 6 ------
3 files changed, 29 deletions(-)
diff --git a/src/gui/painting/qpathclipper.cpp b/src/gui/painting/qpathclipper.cpp
index 3a686bd..a5557c9 100644
--- a/src/gui/painting/qpathclipper.cpp
+++ b/src/gui/painting/qpathclipper.cpp
@@ -252,8 +252,6 @@ class SegmentTree
public:
SegmentTree(QPathSegments &segments);
- QRectF boundingRect() const;
-
void produceIntersections(int segment);
private:
@@ -304,12 +302,6 @@ SegmentTree::SegmentTree(QPathSegments &segments)
m_tree[0] = root;
}
-QRectF SegmentTree::boundingRect() const
-{
- return QRectF(QPointF(m_bounds.x1, m_bounds.y1),
- QPointF(m_bounds.x2, m_bounds.y2));
-}
-
static inline qreal coordinate(const QPointF &pos, int axis)
{
return axis == 0 ? pos.x() : pos.y();
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 468bffe..9a8bfc5 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -190,7 +190,6 @@ public:
QSize sizeHint() const Q_DECL_OVERRIDE;
virtual void setCellBrush(int row, int col, const QBrush &);
- QBrush cellBrush(int row, int col);
inline int cellWidth() const
{ return cellw; }
@@ -459,20 +458,6 @@ void QWellArray::setCellBrush(int row, int col, const QBrush &b)
d->brush[row*numCols()+col] = b;
}
-/*
- Returns the brush set for the cell at \a row, \a column. If no brush is
- set, Qt::NoBrush is returned.
-*/
-
-QBrush QWellArray::cellBrush(int row, int col)
-{
- if (d && row >= 0 && row < numRows() && col >= 0 && col < numCols())
- return d->brush[row*numCols()+col];
- return Qt::NoBrush;
-}
-
-
-
/*!\reimp
*/
diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp
index 48b224f..89cde85 100644
--- a/src/widgets/widgets/qcalendarwidget.cpp
+++ b/src/widgets/widgets/qcalendarwidget.cpp
@@ -654,7 +654,6 @@ public:
int dateEditAcceptDelay() const;
void setDateEditAcceptDelay(int delay);
- QDate date() const;
void setDate(const QDate &date);
bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
@@ -690,11 +689,6 @@ void QCalendarTextNavigator::setWidget(QWidget *widget)
m_widget = widget;
}
-QDate QCalendarTextNavigator::date() const
-{
- return m_date;
-}
-
void QCalendarTextNavigator::setDate(const QDate &date)
{
m_date = date;
--
1.9.3

View File

@ -1,31 +0,0 @@
From 992e762f66f6dd5ed2c5e369da77c7b3fdfcfd80 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Sat, 5 Mar 2016 01:50:54 +0100
Subject: [PATCH 178/328] qt_common.prf: when looking for GCC >= 4.6, match GCC
6+, too
Change-Id: Ia04690f62faa214fb91dffc758e253b5a64e5648
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
---
mkspecs/features/qt_common.prf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mkspecs/features/qt_common.prf b/mkspecs/features/qt_common.prf
index 38602f6..e70d3bf 100644
--- a/mkspecs/features/qt_common.prf
+++ b/mkspecs/features/qt_common.prf
@@ -69,9 +69,9 @@ warnings_are_errors:warning_clean {
QMAKE_CXXFLAGS_WARN_ON += -Werror -ww177,1224,1478,1881 $$WERROR
}
} else:gcc:!clang:!intel_icc {
- # GCC 4.6-4.9, 5.x
+ # GCC 4.6-4.9, 5.x, ...
ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
- contains(ver, "(4\\.[6789]|5\\..)") {
+ contains(ver, "(4\\.[6789]|[5-9]\\..)") {
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=cpp -Wno-error=deprecated-declarations $$WERROR
# GCC prints this bogus warning, after it has inlined a lot of code
--
1.9.3

View File

@ -1,29 +0,0 @@
From b8f98d956501dfa4ce03a137f15d404930a56066 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Sat, 5 Mar 2016 10:25:33 +0300
Subject: [PATCH 201/328] alsatest: Fix the check to treat alsalib 1.1.x as
correct version
Task-number: QTBUG-51681
Change-Id: I63266c33342f02f4d1a5ea5786f5fbc5a1b421b3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
---
config.tests/unix/alsa/alsatest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.tests/unix/alsa/alsatest.cpp b/config.tests/unix/alsa/alsatest.cpp
index cab6533..0b45819 100644
--- a/config.tests/unix/alsa/alsatest.cpp
+++ b/config.tests/unix/alsa/alsatest.cpp
@@ -32,7 +32,7 @@
****************************************************************************/
#include <alsa/asoundlib.h>
-#if(!(SND_LIB_MAJOR == 1 && SND_LIB_MINOR == 0 && SND_LIB_SUBMINOR >= 10))
+#if SND_LIB_VERSION < 0x1000a // 1.0.10
#error "Alsa version found too old, require >= 1.0.10"
#endif
--
1.9.3

View File

@ -1,149 +0,0 @@
From 2020d2cb63b851723e188c002acbe25b5f066525 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Fri, 4 Mar 2016 15:19:50 -0800
Subject: [PATCH 221/328] QObject: fix GCC 6 warning about qt_static_metacall's
'hidden' attribute use
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This warning is triggered when we try to apply the Q_DECL_HIDDEN
attribute to a class in an unnamed namespace. Such classes are
already not exported.
qobjectdefs.h:175:108: warning: visibility attribute ignored [-Wattributes]
qobjectdefs.h:198:108: warning: visibility attribute ignored [-Wattributes]
Added a test on gadgets (and QObjects) in unnamed namespaces,
because qtbase currently does not contain such Q_GADGETs.
Done-with: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: Ic747cc2ab45e4dc6bb70ffff1438c747b05c5672
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
---
src/corelib/kernel/qobjectdefs.h | 15 ++++++++++--
tests/auto/tools/moc/tst_moc.cpp | 50 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index b1ed971..2e9ed4f 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -152,6 +152,12 @@ inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
# define Q_OBJECT_NO_OVERRIDE_WARNING
#endif
+#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && Q_CC_GNU >= 600
+# define Q_OBJECT_NO_ATTRIBUTES_WARNING QT_WARNING_DISABLE_GCC("-Wattributes")
+#else
+# define Q_OBJECT_NO_ATTRIBUTES_WARNING
+#endif
+
/* qmake ignore Q_OBJECT */
#define Q_OBJECT \
public: \
@@ -162,10 +168,11 @@ public: \
virtual const QMetaObject *metaObject() const; \
virtual void *qt_metacast(const char *); \
virtual int qt_metacall(QMetaObject::Call, int, void **); \
- QT_WARNING_POP \
QT_TR_FUNCTIONS \
private: \
+ Q_OBJECT_NO_ATTRIBUTES_WARNING \
Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
+ QT_WARNING_POP \
struct QPrivateSignal {};
/* qmake ignore Q_OBJECT */
@@ -179,7 +186,11 @@ public: \
void qt_check_for_QGADGET_macro(); \
typedef void QtGadgetHelper; \
private: \
- Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **);
+ QT_WARNING_PUSH \
+ Q_OBJECT_NO_ATTRIBUTES_WARNING \
+ Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
+ QT_WARNING_POP \
+ /*end*/
#endif // QT_NO_META_MACROS
#else // Q_MOC_RUN
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index c113b7c..5c16c7a 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -131,6 +131,33 @@ typedef struct {
int doNotConfuseMoc;
} OldStyleCStruct;
+namespace {
+
+ class GadgetInUnnamedNS
+ {
+ Q_GADGET
+ Q_PROPERTY(int x READ x WRITE setX)
+ Q_PROPERTY(int y READ y WRITE setY)
+ public:
+ explicit GadgetInUnnamedNS(int x, int y) : m_x(x), m_y(y) {}
+ int x() const { return m_x; }
+ int y() const { return m_y; }
+ void setX(int x) { m_x = x; }
+ void setY(int y) { m_y = y; }
+
+ private:
+ int m_x, m_y;
+ };
+
+ class ObjectInUnnamedNS : public QObject
+ {
+ Q_OBJECT
+ public:
+ explicit ObjectInUnnamedNS(QObject *parent = Q_NULLPTR) : QObject(parent) {}
+ };
+
+}
+
class Sender : public QObject
{
Q_OBJECT
@@ -597,6 +624,7 @@ private slots:
void relatedMetaObjectsNameConflict_data();
void relatedMetaObjectsNameConflict();
void strignLiteralsInMacroExtension();
+ void unnamedNamespaceObjectsAndGadgets();
void veryLongStringData();
void gadgetHierarchy();
@@ -3421,6 +3449,28 @@ class VeryLongStringData : public QObject
#undef repeat65534
};
+void tst_Moc::unnamedNamespaceObjectsAndGadgets()
+{
+ // these just test very basic functionality of gadgets and objects
+ // defined in unnamed namespaces.
+ {
+ GadgetInUnnamedNS gadget(21, 42);
+ QCOMPARE(gadget.x(), 21);
+ QCOMPARE(gadget.y(), 42);
+ gadget.staticMetaObject.property(0).writeOnGadget(&gadget, 12);
+ gadget.staticMetaObject.property(1).writeOnGadget(&gadget, 24);
+ QCOMPARE(gadget.x(), 12);
+ QCOMPARE(gadget.y(), 24);
+ }
+
+ {
+ ObjectInUnnamedNS object;
+ QObject *qObject = &object;
+ QCOMPARE(static_cast<ObjectInUnnamedNS *>(qObject),
+ qobject_cast<ObjectInUnnamedNS *>(qObject));
+ }
+}
+
void tst_Moc::veryLongStringData()
{
const QMetaObject *mobj = &VeryLongStringData::staticMetaObject;
--
1.9.3

View File

@ -1,132 +0,0 @@
From 2e02de165115c9d67ac343ff0960ed80f9c09bc8 Mon Sep 17 00:00:00 2001
From: Thiago Macieira <thiago.macieira@intel.com>
Date: Tue, 15 Mar 2016 11:00:20 -0700
Subject: [PATCH 293/328] Fix QtDBus deadlock inside kded/kiod
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Whenever a message spy was installed, we failed to actually process
looped-back messages by queueing them for processing by the spy. That
had as a consequence that the caller got an error reply. Worse, since
the message had been queued, QtDBus would attempt to deliver it later.
Since that message had isLocal==true, bad things happened inside the
manager thread.
The correct solution is not to queue the message for the filter. If the
message is local, then simply deliver directly, as we're still in the
user's thread. This used to be the behavior in Qt 5.5.
Task-number: QTBUG-51676
Change-Id: I1dc112894cde7121e8ce302ae51b438ade1ff612
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Jan Kundrát <jkt@kde.org>
---
src/dbus/qdbusintegrator.cpp | 42 ++++++++++++++++++++++++++++++++----------
src/dbus/qdbusintegrator_p.h | 1 +
2 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..478a2c4 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -481,6 +481,11 @@ QDBusSpyCallEvent::~QDBusSpyCallEvent()
void QDBusSpyCallEvent::placeMetaCall(QObject *)
{
+ invokeSpyHooks(msg, hooks, hookCount);
+}
+
+inline void QDBusSpyCallEvent::invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount)
+{
// call the spy hook list
for (int i = 0; i < hookCount; ++i)
hooks[i](msg);
@@ -509,7 +514,12 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
{
if (!ref.load())
return false;
- if (!dispatchEnabled && !QDBusMessagePrivate::isLocal(amsg)) {
+
+ // local message are always delivered, regardless of filtering
+ // or whether the dispatcher is enabled
+ bool isLocal = QDBusMessagePrivate::isLocal(amsg);
+
+ if (!dispatchEnabled && !isLocal) {
// queue messages only, we'll handle them later
qDBusDebug() << this << "delivery is suspended";
pendingMessages << amsg;
@@ -523,13 +533,23 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
// let them see the signal too
return false;
case QDBusMessage::MethodCallMessage:
- // run it through the spy filters (if any) before the regular processing
+ // run it through the spy filters (if any) before the regular processing:
+ // a) if it's a local message, we're in the caller's thread, so invoke the filter directly
+ // b) if it's an external message, post to the main thread
if (Q_UNLIKELY(qDBusSpyHookList.exists()) && qApp) {
const QDBusSpyHookList &list = *qDBusSpyHookList;
- qDBusDebug() << this << "invoking message spies";
- QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this),
- amsg, list.constData(), list.size()));
- return true;
+ if (isLocal) {
+ Q_ASSERT(QThread::currentThread() != thread());
+ qDBusDebug() << this << "invoking message spies directly";
+ QDBusSpyCallEvent::invokeSpyHooks(amsg, list.constData(), list.size());
+ } else {
+ qDBusDebug() << this << "invoking message spies via event";
+ QCoreApplication::postEvent(qApp, new QDBusSpyCallEvent(this, QDBusConnection(this),
+ amsg, list.constData(), list.size()));
+
+ // we'll be called back, so return
+ return true;
+ }
}
handleObjectCall(amsg);
@@ -1451,9 +1471,9 @@ void QDBusConnectionPrivate::handleObjectCall(const QDBusMessage &msg)
// that means the dispatchLock mutex is locked
// must not call out to user code in that case
//
- // however, if the message is internal, handleMessage was called
- // directly and no lock is in place. We can therefore call out to
- // user code, if necessary
+ // however, if the message is internal, handleMessage was called directly
+ // (user's thread) and no lock is in place. We can therefore call out to
+ // user code, if necessary.
ObjectTreeNode result;
int usedLength;
QThread *objThread = 0;
@@ -1492,12 +1512,14 @@ void QDBusConnectionPrivate::handleObjectCall(const QDBusMessage &msg)
usedLength, msg));
return;
} else if (objThread != QThread::currentThread()) {
- // synchronize with other thread
+ // looped-back message, targeting another thread:
+ // synchronize with it
postEventToThread(HandleObjectCallPostEventAction, result.obj,
new QDBusActivateObjectEvent(QDBusConnection(this), this, result,
usedLength, msg, &sem));
semWait = true;
} else {
+ // looped-back message, targeting current thread
semWait = false;
}
} // release the lock
diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h
index 2bbebdf..c0d9c22 100644
--- a/src/dbus/qdbusintegrator_p.h
+++ b/src/dbus/qdbusintegrator_p.h
@@ -145,6 +145,7 @@ public:
{}
~QDBusSpyCallEvent();
void placeMetaCall(QObject *) Q_DECL_OVERRIDE;
+ static inline void invokeSpyHooks(const QDBusMessage &msg, const Hook *hooks, int hookCount);
QDBusConnection conn; // keeps the refcount in QDBusConnectionPrivate up
QDBusMessage msg;
--
1.9.3

View File

@ -1,88 +0,0 @@
From b024fbe83863fc57364a52c717d5b43d654bdb5d Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Sat, 5 Mar 2016 12:23:21 -0800
Subject: [PATCH] QtDBus: clean up signal hooks and object tree in
closeConnection
If a QObject is added or passed as receiver to QDBusConnection::connect()
and it is managed by Q_GLOBAL_STATIC or similar mechanism, it is
possible that when that its destructor is called after the dbus daemon
thread ends. In that case, QObject::destroyed connected via
Qt::BlockingQueuedConnection to QDBusConnectionPrivate will cause dead
lock since the thread is no longer processing events.
Task-number: QTBUG-51648
Change-Id: I1a1810a6d6d0234af0269d5f3fc1f54101bf1547
---
src/dbus/qdbusconnection_p.h | 1 +
src/dbus/qdbusintegrator.cpp | 28 +++++++++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index c77daf7..565eb83 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -254,6 +254,7 @@ private:
const QVector<int> &metaTypes, int slotIdx);
SignalHookHash::Iterator removeSignalHookNoLock(SignalHookHash::Iterator it);
+ void disconnectObjectTree(ObjectTreeNode &node);
bool isServiceRegisteredByThread(const QString &serviceName);
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..a3cd47b 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1030,7 +1030,6 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
qPrintable(name));
closeConnection();
- rootNode.children.clear(); // free resources
qDeleteAll(cachedMetaObjects);
if (mode == ClientMode || mode == PeerMode) {
@@ -1052,6 +1051,20 @@ QDBusConnectionPrivate::~QDBusConnectionPrivate()
}
}
+void QDBusConnectionPrivate::disconnectObjectTree(QDBusConnectionPrivate::ObjectTreeNode &haystack)
+{
+ QDBusConnectionPrivate::ObjectTreeNode::DataList::Iterator it = haystack.children.begin();
+
+ while (it != haystack.children.end()) {
+ disconnectObjectTree(*it);
+ it++;
+ }
+
+ if (haystack.obj) {
+ haystack.obj->disconnect(this);
+ }
+}
+
void QDBusConnectionPrivate::closeConnection()
{
QDBusWriteLocker locker(CloseConnectionAction, this);
@@ -1075,6 +1088,19 @@ void QDBusConnectionPrivate::closeConnection()
}
qDeleteAll(pendingCalls);
+
+ // clean up all signal hook and object tree, to avoid QObject::destroyed
+ // being activated to dbus daemon thread which already quits.
+ // dbus connection is already closed, so there is nothing we could do be clean
+ // up everything here.
+ SignalHookHash::iterator sit = signalHooks.begin();
+ while (sit != signalHooks.end()) {
+ sit.value().obj->disconnect(this);
+ sit++;
+ }
+
+ disconnectObjectTree(rootNode);
+ rootNode.children.clear(); // free resources
}
void QDBusConnectionPrivate::checkThread()
--
2.5.0

View File

@ -1,156 +0,0 @@
From 136eeec876ed5b995e7c27bcdcefe0199f5f183d Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Thu, 3 Mar 2016 21:56:53 -0800
Subject: [PATCH] QtDBus: finish all pending call with error if disconnected
libdbus will send a local signal if connection gets disconnected. When
this happens, end all pending calls with QDBusError::Disconnected.
Task-number: QTBUG-51649
Change-Id: I5c7d2a468bb5da746d0c0e53e458c1e376f186a9
---
src/dbus/qdbusintegrator.cpp | 26 +++++++++++++++++-----
src/dbus/qdbusutil_p.h | 6 +++++
.../dbus/qdbusconnection/tst_qdbusconnection.cpp | 22 ++++++++++++++++++
.../dbus/qdbusconnection/tst_qdbusconnection.h | 1 +
4 files changed, 49 insertions(+), 6 deletions(-)
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index cd44861..320419f 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -519,6 +519,14 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
switch (amsg.type()) {
case QDBusMessage::SignalMessage:
handleSignal(amsg);
+ // Check local disconnected signal from libdbus
+ if (amsg.interface() == QDBusUtil::dbusInterfaceLocal()
+ && amsg.path() == QDBusUtil::dbusPathLocal()
+ && amsg.member() == QDBusUtil::disconnected()
+ && !QDBusMessagePrivate::isLocal(amsg)) {
+ while (!pendingCalls.isEmpty())
+ processFinishedCall(pendingCalls.first());
+ }
// if there are any other filters in this DBusConnection,
// let them see the signal too
return false;
@@ -1767,10 +1775,16 @@ void QDBusConnectionPrivate::processFinishedCall(QDBusPendingCallPrivate *call)
QDBusMessage &msg = call->replyMessage;
if (call->pending) {
- // decode the message
- DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
- msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
- q_dbus_message_unref(reply);
+ // when processFinishedCall is called and pending call is not completed,
+ // it means we received disconnected signal from libdbus
+ if (q_dbus_pending_call_get_completed(call->pending)) {
+ // decode the message
+ DBusMessage *reply = q_dbus_pending_call_steal_reply(call->pending);
+ msg = QDBusMessagePrivate::fromDBusMessage(reply, connection->capabilities);
+ q_dbus_message_unref(reply);
+ } else {
+ msg = QDBusMessage::createError(QDBusError::Disconnected, QDBusUtil::disconnectedErrorMessage());
+ }
}
qDBusDebug() << connection << "got message reply:" << msg;
@@ -2070,8 +2084,8 @@ void QDBusConnectionPrivate::sendInternal(QDBusPendingCallPrivate *pcall, void *
pcall->pending = pending;
q_dbus_pending_call_set_notify(pending, qDBusResultReceived, pcall, 0);
- // DBus won't notify us when a peer disconnects so we need to track these ourselves
- if (mode == QDBusConnectionPrivate::PeerMode)
+ // DBus won't notify us when a peer disconnects or server terminates so we need to track these ourselves
+ if (mode == QDBusConnectionPrivate::PeerMode || mode == QDBusConnectionPrivate::ClientMode)
pendingCalls.append(pcall);
return;
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 8f5ae92..ca70ff9 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -155,6 +155,8 @@ namespace QDBusUtil
{ return QStringLiteral(DBUS_SERVICE_DBUS); }
inline QString dbusPath()
{ return QStringLiteral(DBUS_PATH_DBUS); }
+ inline QString dbusPathLocal()
+ { return QStringLiteral(DBUS_PATH_LOCAL); }
inline QString dbusInterface()
{
// it's the same string, but just be sure
@@ -165,8 +167,12 @@ namespace QDBusUtil
{ return QStringLiteral(DBUS_INTERFACE_PROPERTIES); }
inline QString dbusInterfaceIntrospectable()
{ return QStringLiteral(DBUS_INTERFACE_INTROSPECTABLE); }
+ inline QString dbusInterfaceLocal()
+ { return QStringLiteral(DBUS_INTERFACE_LOCAL); }
inline QString nameOwnerChanged()
{ return QStringLiteral("NameOwnerChanged"); }
+ inline QString disconnected()
+ { return QStringLiteral("Disconnected"); }
inline QString disconnectedErrorMessage()
{ return QStringLiteral("Not connected to D-Bus server"); }
}
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
index e91f87d..6c7e6b1 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
@@ -1218,6 +1218,28 @@ void tst_QDBusConnection::callVirtualObjectLocal()
QCOMPARE(obj.replyArguments, subPathReply.arguments());
}
+void tst_QDBusConnection::pendingCallWhenDisconnected()
+{
+ QDBusServer *server = new QDBusServer;
+ QDBusConnection con = QDBusConnection::connectToPeer(server->address(), "disconnect");
+ QTestEventLoop::instance().enterLoop(2);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QVERIFY(con.isConnected());
+
+ delete server;
+
+ // Make sure we call the method before we know it is disconnected.
+ QVERIFY(con.isConnected());
+ QDBusMessage message = QDBusMessage::createMethodCall("", "/", QString(), "method");
+ QDBusPendingCall reply = con.asyncCall(message);
+
+ QTestEventLoop::instance().enterLoop(2);
+ QVERIFY(!con.isConnected());
+ QVERIFY(reply.isFinished());
+ QVERIFY(reply.isError());
+ QVERIFY(reply.error().type() == QDBusError::Disconnected);
+}
+
QString MyObject::path;
QString MyObjectWithoutInterface::path;
QString MyObjectWithoutInterface::interface;
diff --git a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
index a53ba32..720e484 100644
--- a/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
+++ b/tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
@@ -121,6 +121,7 @@ private slots:
void registerVirtualObject();
void callVirtualObject();
void callVirtualObjectLocal();
+ void pendingCallWhenDisconnected();
public:
QString serviceName() const { return "org.qtproject.Qt.Autotests.QDBusConnection"; }
--
2.5.0
diff -up qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h.QTBUG-51649 qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h
--- qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h.QTBUG-51649 2016-02-18 01:24:38.000000000 -0600
+++ qtbase-opensource-src-5.6.0-rc/src/dbus/dbus_minimal_p.h 2016-03-11 11:40:11.176244645 -0600
@@ -99,8 +99,10 @@ typedef dbus_uint32_t dbus_bool_t;
/* dbus-shared.h */
#define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
#define DBUS_PATH_DBUS "/org/freedesktop/DBus"
+#define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
#define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
#define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
+#define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
#define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
#define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */

View File

@ -1,735 +0,0 @@
commit 8a2d9073e959356808ce1685822b839d880e6498
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Sep 14 17:27:35 2012 +0200
Replace most calls to select(2) with poll(2)
select(2) limits the number of file descriptor in a process to
FD_SETSIZE (typically 1023). Process creation and certain socket
operations fail because they call select(2) on a file descriptor outside
the FD_SETSIZE range.
The remaining select(2) calls are used for timeouts only, or are in the
traditional event loop. The glib-based event loop does not use
select(2), so this should be sufficient.
This change adds a poll emulation for VxWorks, which only offers
select(2).
Change-Id: I9b0cf5bec81da70b29c501c62d14fb57df87fa61
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index e159bf8..bb8a3ae 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -134,13 +134,6 @@ static void qt_sa_sigchld_handler(int signum)
oldAction(signum);
}
-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;
@@ -235,9 +228,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";
@@ -246,8 +239,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;
@@ -996,17 +989,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.
@@ -1029,10 +1011,10 @@ bool QProcessPrivate::waitForStarted(int msecs)
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)
@@ -1048,6 +1030,47 @@ bool QProcessPrivate::waitForStarted(int msecs)
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);
@@ -1059,28 +1082,9 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
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;
}
@@ -1090,18 +1094,18 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
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;
@@ -1109,13 +1113,13 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
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;
}
@@ -1131,29 +1135,9 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
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;
}
@@ -1164,24 +1148,24 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
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;
@@ -1198,29 +1182,9 @@ bool QProcessPrivate::waitForFinished(int msecs)
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;
}
@@ -1230,20 +1194,20 @@ bool QProcessPrivate::waitForFinished(int msecs)
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;
}
@@ -1253,10 +1217,10 @@ bool QProcessPrivate::waitForFinished(int msecs)
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 --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index cc54798..ca178bb 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -103,4 +103,165 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
}
}
+#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 // Q_OS_VXWORKS
+
QT_END_NAMESPACE
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
index 6342b03..f7f4767 100644
--- a/src/corelib/kernel/qcore_unix_p.h
+++ b/src/corelib/kernel/qcore_unix_p.h
@@ -71,6 +71,8 @@
#if defined(Q_OS_VXWORKS)
# include <ioLib.h>
+#else
+# include <poll.h>
#endif
struct sockaddr;
@@ -341,6 +343,36 @@ void qt_nanosleep(timespec amount);
Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
const struct timeval *tv);
+#ifdef Q_OS_VXWORKS
+// Poll emulation for VxWorks. Provided by <poll.h> on other systems.
+
+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;
+}
+
+// Deprecated due to FD_SETSIZE limitation, use qt_safe_poll instead.
+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 --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index 2bcf1ac..efb8128 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -293,16 +293,11 @@ void QLocalServerPrivate::_q_onNewConnection()
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 --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 49eb71a..c598c2b 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -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
@@ -524,25 +520,16 @@ bool QLocalSocket::waitForConnected(int msec)
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;
+ pollfd fd;
+ fd.fd = d->connectingSocket;
+ fd.events = POLLIN | POLLOUT;
- // timeout can not be 0 or else select will return an error.
- if (0 == msec)
- timeout.tv_usec = 1000;
-
- int result = -1;
- // on Linux timeout will be updated by select, but _not_ on other systems.
+ int result;
QElapsedTimer timer;
+ int remaining = msec > 0 ? msec : 1000;
timer.start();
- while (state() == ConnectingState
- && (-1 == msec || timer.elapsed() < msec)) {
- result = ::select(d->connectingSocket + 1, &fds, 0, 0, &timeout);
+ 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"));
@@ -550,6 +537,11 @@ bool QLocalSocket::waitForConnected(int msec)
}
if (result > 0)
d->_q_connectToSocket();
+ if (msec >= 0) {
+ remaining = timer.elapsed() - msec;
+ if (remaining < 0)
+ break;
+ }
}
return (state() == ConnectedState);
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 4f3408b..a1bb298 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -1122,48 +1122,40 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize)
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;
}

12
qt5-qtbase-cxxflag.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf
--- qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than 2016-06-02 17:30:07.249027901 +0200
+++ qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf 2016-06-02 17:30:14.681748012 +0200
@@ -32,7 +32,7 @@
#
QMAKE_CFLAGS_OPTIMIZE = -O2
-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
+QMAKE_CFLAGS_OPTIMIZE_FULL = -O2
QMAKE_CFLAGS += -pipe
QMAKE_CFLAGS_DEPS += -M

View File

@ -30,17 +30,14 @@
%if 0%{?fedora} > 23 || 0%{?rhel} > 6
%global journald -journald
BuildRequires: pkgconfig(libsystemd)
%endif
%if 0%{?fedora} > 23
# gcc6: FTBFS
%global qt5_deprecated_flag -Wno-deprecated-declaration
%global qt5_deprecated_flag -Wno-deprecated-declarations
# gcc6: Qt assumes this in places
%global qt5_null_flag -fno-delete-null-pointer-checks
%ifarch armv7hl
# gcc6: arm FTBFS
%global qt5_arm_flag -mfpu=neon
%endif
%endif
# define to build docs, need to undef this for bootstrapping
@ -48,18 +45,18 @@
# only primary archs (for now), allow secondary to bootstrap
%if ! 0%{?bootstrap}
%ifarch %{arm} %{ix86} x86_64 %{power64} s390 s390x aarch64
%define docs 1
%global docs 1
%endif
%global examples 1
%global tests 1
%endif
%define examples 1
#define prerelease rc
Summary: Qt5 - QtBase components
Name: qt5-qtbase
Version: 5.6.0
Release: 13%{?prerelease:.%{prerelease}}%{?dist}
Version: 5.6.1
Release: 3%{?prerelease:.%{prerelease}}%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -87,10 +84,6 @@ Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch
Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch
# upstreamable patches
# support poll
# https://bugreports.qt-project.org/browse/QTBUG-27195
# NEEDS REBASE
Patch50: qt5-poll.patch
# Workaround moc/multilib issues
# https://bugzilla.redhat.com/show_bug.cgi?id=1290020
@ -100,27 +93,20 @@ Patch52: qtbase-opensource-src-5.6.0-moc_WORDSIZE.patch
# arm patch
Patch54: qtbase-opensource-src-5.6.0-arm.patch
# https://codereview.qt-project.org/#/c/151496/
Patch55: QTBUG-51648-QtDBus-clean-up-signal-hooks-and-object-tree-in-clos.patch
# https://codereview.qt-project.org/#/c/151340/
Patch56: QTBUG-51649-QtDBus-finish-all-pending-call-with-error-if-disconn.patch
# recently passed code review, not integrated yet
# https://codereview.qt-project.org/126102/
Patch60: moc-get-the-system-defines-from-the-compiler-itself.patch
## upstream patches
# drop -O3 and make -O2 by default
Patch61: qt5-qtbase-cxxflag.patch
# Item views, https://bugreports.qt.io/browse/QTBUG-48870
Patch158: 0058-QtGui-Avoid-rgba64-rgba32-conversion-on-every-pixel-.patch
Patch176: 0076-QListView-fix-skipping-indexes-in-selectedIndexes.patch
Patch201: 0101-xcb-include-cmath.patch
Patch277: 0177-Fix-GCC-6-Wunused-functions-warnings.patch
Patch278: 0178-qt_common.prf-when-looking-for-GCC-4.6-match-GCC-6-t.patch
Patch301: 0201-alsatest-Fix-the-check-to-treat-alsalib-1.1.x-as-cor.patch
Patch321: 0221-QObject-fix-GCC-6-warning-about-qt_static_metacall-s.patch
Patch393: 0293-Fix-QtDBus-deadlock-inside-kded-kiod.patch
## upstream patches
Patch101: 0001-xcb-Properly-interpret-data.l-0-field-of-XdndStatus-.patch
Patch111: 0011-XCB-Auto-detect-xcb-glx-also-with-xcb-qt.patch
Patch132: 0032-xcb-Fix-drop-of-text-uri-list-and-text-html.patch
Patch133: 0033-xcb-Fix-dropping-URL-on-Firefox-window.patch
Patch148: 0148-xcb-Disable-GLX-pbuffers-with-Chromium-in-VMs.patch
Patch155: 0155-xcb-Fix-transient-parent-and-Qt-Window-flag.patch
# macros, be mindful to keep sync'd with macros.qt5
Source10: macros.qt5
@ -174,6 +160,7 @@ BuildRequires: pkgconfig(libproxy-1.0)
BuildRequires: pkgconfig(ice) pkgconfig(sm)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libudev)
%global openssl -openssl-linked
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libpulse) pkgconfig(libpulse-mainloop-glib)
%if 0%{?fedora}
@ -213,6 +200,13 @@ BuildRequires: libicu-devel
BuildRequires: pkgconfig(xcb) pkgconfig(xcb-glx) pkgconfig(xcb-icccm) pkgconfig(xcb-image) pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(zlib)
%if 0%{?tests}
BuildRequires: dbus-x11
BuildRequires: mesa-dri-drivers
BuildRequires: time
BuildRequires: xorg-x11-server-Xvfb
%endif
%if 0%{?qtchooser}
%if 0%{?fedora}
Conflicts: qt < 1:4.8.6-10
@ -363,19 +357,15 @@ RPM macros for building Qt5 packages.
%patch52 -p1 -b .moc_WORDSIZE
%patch54 -p1 -b .arm
%patch55 -p1 -b .QTBUG-51648
## FTBFS, omit for now
%patch56 -p1 -b .QTBUG-51649
%patch60 -p1 -b .moc_system_defines
%patch61 -p1 -b .qt5-qtbase-cxxflag
%patch158 -p1 -b .0058
%patch176 -p1 -b .0076
%patch201 -p1 -b .0101
%patch277 -p1 -b .0177
%patch278 -p1 -b .0178
%patch301 -p1 -b .0201
%patch321 -p1 -b .0221
%patch393 -p1 -b .0293
%patch101 -p1 -b .0001-xcb
%patch111 -p1 -b .0011
%patch132 -p1 -b .0032
%patch133 -p1 -b .0033
%patch148 -p1 -b .0148
%patch155 -p1 -b .0155
%define platform linux-g++
@ -423,6 +413,10 @@ test -x configure || chmod +x configure
%build
## FIXME/TODO:
# * for %%ix86, add sse2 enabled builds for Qt5Gui, Qt5Core, QtNetwork, see also:
# http://anonscm.debian.org/cgit/pkg-kde/qt/qtbase.git/tree/debian/rules (234-249)
## adjust $RPM_OPT_FLAGS
# remove -fexceptions
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
@ -461,10 +455,10 @@ export MAKEFLAGS="%{?_smp_mflags}"
-iconv \
-icu \
%{?journald} \
-openssl-linked \
%{?openssl} \
-optimized-qmake \
%{!?examples:-nomake examples} \
-nomake tests \
%{!?tests:-nomake tests} \
-no-pch \
-no-rpath \
-no-separate-debug-info \
@ -536,7 +530,7 @@ translationdir=%{_qt5_translationdir}
Name: Qt5
Description: Qt5 Configuration
Version: 5.6.0
Version: %{version}
EOF
# rpm macros
@ -604,17 +598,23 @@ popd
install -p -m755 -D %{SOURCE6} %{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/10-qt5-check-opengl2.sh
## work-in-progress, doesn't work yet -- rex
%check
export CMAKE_PREFIX_PATH=%{buildroot}%{_prefix}
%if 0%{?tests}
## see tests/README for expected environment (running a plasma session essentially)
## we are not quite there yet
export CTEST_OUTPUT_ON_FAILURE=1
export PATH=%{buildroot}%{_bindir}:$PATH
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
mkdir -p tests/auto/cmake/%{_target_platform}
pushd tests/auto/cmake/%{_target_platform}
cmake .. ||:
ctest --output-on-failure ||:
popd
export PATH=%{buildroot}%{_qt5_bindir}:$PATH
export LD_LIBRARY_PATH=%{buildroot}%{_qt5_libdir}
# dbus tests error out when building if session bus is not available
dbus-launch --exit-with-session \
make sub-tests %{?_smp_mflags} -k ||:
xvfb-run -a --server-args="-screen 0 1280x1024x32" \
dbus-launch --exit-with-session \
time \
make check -k ||:
%endif
%if 0%{?qtchooser}
%pre
@ -627,8 +627,8 @@ if [ $1 -gt 1 ] ; then
%{_sbindir}/update-alternatives \
--remove qtchooser-default \
%{_sysconfdir}/xdg/qtchooser/qt5.conf >& /dev/null ||:
%endif
fi
%endif
%post
/sbin/ldconfig
@ -930,6 +930,7 @@ fi
%{_qt5_libdir}/libQt5EglDeviceIntegration.so.5*
%{_qt5_plugindir}/platforms/libqeglfs.so
%{_qt5_plugindir}/platforms/libqminimalegl.so
%dir %{_qt5_plugindir}/egldeviceintegrations/
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-kms-integration.so
%{_qt5_plugindir}/egldeviceintegrations/libqeglfs-x11-integration.so
%{_qt5_plugindir}/xcbglintegrations/libqxcb-egl-integration.so
@ -959,6 +960,42 @@ fi
%changelog
* Tue Jun 14 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.1-3
- backport some xcb-plugin-related fixes
* Thu Jun 09 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.1-2
- fix Qt5.pc version
* Thu Jun 09 2016 Jan Grulich <jgrulich@redhat.com> - 5.6.1-1
- Update to 5.6.1
* Thu Jun 02 2016 Than Ngo <than@redhat.com> - 5.6.0-21
- drop gcc6 workaround on arm
* Fri May 20 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-20
- -Wno-deprecated-declarations (typo missed trailing 's')
* Fri May 13 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-19
- pull in upstream drag-n-drop related fixes (QTBUG-45812, QTBUG-51215)
* Sat May 07 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-18
- revert out-of-tree build, breaks Qt5*Config.cmake *_PRIVATE_INCLUDE_DIRS entries (all blank)
* Thu May 05 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-17
- support out-of-tree build
- better %%check
- pull in final/upstream fixes for QTBUG-51648,QTBUG-51649
- disable examples/tests in bootstrap mode
* Sat Apr 30 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-16
- own %%{_qt5_plugindir}/egldeviceintegrations
* Mon Apr 18 2016 Caolán McNamara <caolanm@redhat.com> - 5.6.0-15
- full rebuild for hunspell 1.4.0
* Mon Apr 18 2016 Caolán McNamara <caolanm@redhat.com> - 5.6.0-14
- bootstrap rebuild for hunspell 1.4.0
* Sat Apr 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 5.6.0-13
- -devel: Provides: qt5-qtbase-private-devel (#1233829)

View File

@ -1 +1 @@
833a991814a38947aa07da7dfd4eb153 qtbase-opensource-src-5.6.0.tar.xz
b23232190a3df61fe1ba81636987b036 qtbase-opensource-src-5.6.1.tar.xz