Accepting request 310365 from KDE:Qt5
Update to 5.4.2 OBS-URL: https://build.opensuse.org/request/show/310365 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=42
This commit is contained in:
parent
fc9008bb2f
commit
4575c33e9c
@ -1,37 +0,0 @@
|
|||||||
From 8d6341a721d07e3cc30032bcc89f7e25cb00b9eb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Albert Astals Cid <aacid@kde.org>
|
|
||||||
Date: Mon, 16 Feb 2015 22:53:02 +0100
|
|
||||||
Subject: [PATCH] Call [ofono|nm]Registered delayed in constructor otherwise
|
|
||||||
signals will be lost
|
|
||||||
|
|
||||||
If we call them just in the constructor all the signals they sent
|
|
||||||
out can't be connected and will be lost, particularly this means
|
|
||||||
the QNetworkConfigurationManager doesn't see my ethernet connection
|
|
||||||
and thus thinks i'm not online
|
|
||||||
|
|
||||||
Change-Id: I1480f76338d6ae4fbed676f9fa40ada18ea431ad
|
|
||||||
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
||||||
---
|
|
||||||
src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
|
|
||||||
index f52b9d4..0378ac7 100644
|
|
||||||
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
|
|
||||||
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
|
|
||||||
@@ -80,10 +80,10 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
|
|
||||||
this, SLOT(ofonoUnRegistered(QString)));
|
|
||||||
|
|
||||||
if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.ofono"))
|
|
||||||
- ofonoRegistered();
|
|
||||||
+ QMetaObject::invokeMethod(this, "ofonoRegistered", Qt::QueuedConnection);
|
|
||||||
|
|
||||||
if (QDBusConnection::systemBus().interface()->isServiceRegistered(NM_DBUS_SERVICE))
|
|
||||||
- nmRegistered();
|
|
||||||
+ QMetaObject::invokeMethod(this, "nmRegistered", Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
|
|
||||||
QNetworkManagerEngine::~QNetworkManagerEngine()
|
|
||||||
--
|
|
||||||
2.1.4
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
From: Kåre Särs <kare.sars@iki.fi>
|
|
||||||
Date: Thu, 22 Jan 2015 20:40:37 +0000
|
|
||||||
Subject: Fix Meta+... shortcuts on XCB
|
|
||||||
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=0d990b9ca117514fe83f53b39f25d6272304f2fb
|
|
||||||
---
|
|
||||||
Fix Meta+... shortcuts on XCB
|
|
||||||
|
|
||||||
If the window contains a widget that accepts text input, a Meta+...
|
|
||||||
shortcut will be interpreted as if no modifier was pressed. This fix
|
|
||||||
enables the usage of Meta+... shortcuts for the XCB platform plugin.
|
|
||||||
|
|
||||||
Change-Id: I80034b7e6bbbf18471c86fc77320d5038f5740be
|
|
||||||
Task-number: QTBUG-43572
|
|
||||||
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
||||||
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
||||||
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
||||||
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
|
||||||
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
|
||||||
@@ -933,7 +933,7 @@
|
|
||||||
QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
|
|
||||||
{
|
|
||||||
// turn off the modifier bits which doesn't participate in shortcuts
|
|
||||||
- Qt::KeyboardModifiers notNeeded = Qt::MetaModifier | Qt::KeypadModifier | Qt::GroupSwitchModifier;
|
|
||||||
+ Qt::KeyboardModifiers notNeeded = Qt::KeypadModifier | Qt::GroupSwitchModifier;
|
|
||||||
Qt::KeyboardModifiers modifiers = event->modifiers() &= ~notNeeded;
|
|
||||||
// create a fresh kb state and test against the relevant modifier combinations
|
|
||||||
struct xkb_state *kb_state = xkb_state_new(xkb_keymap);
|
|
||||||
@@ -963,10 +963,12 @@
|
|
||||||
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
|
|
||||||
xkb_mod_index_t altMod = xkb_keymap_mod_get_index(xkb_keymap, "Alt");
|
|
||||||
xkb_mod_index_t controlMod = xkb_keymap_mod_get_index(xkb_keymap, "Control");
|
|
||||||
+ xkb_mod_index_t metaMod = xkb_keymap_mod_get_index(xkb_keymap, "Meta");
|
|
||||||
|
|
||||||
Q_ASSERT(shiftMod < 32);
|
|
||||||
Q_ASSERT(altMod < 32);
|
|
||||||
Q_ASSERT(controlMod < 32);
|
|
||||||
+ Q_ASSERT(metaMod < 32);
|
|
||||||
|
|
||||||
xkb_mod_mask_t depressed;
|
|
||||||
int qtKey = 0;
|
|
||||||
@@ -987,6 +989,8 @@
|
|
||||||
depressed |= (1 << shiftMod);
|
|
||||||
if (neededMods & Qt::ControlModifier)
|
|
||||||
depressed |= (1 << controlMod);
|
|
||||||
+ if (neededMods & Qt::MetaModifier)
|
|
||||||
+ depressed |= (1 << metaMod);
|
|
||||||
xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods, 0, 0, lockedLayout);
|
|
||||||
sym = xkb_state_key_get_one_sym(kb_state, keycode);
|
|
||||||
}
|
|
@ -1,690 +0,0 @@
|
|||||||
From cff39fba10ffc10ee4dcfdc66ff6528eb26462d3 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Markus Goetz <markus@woboq.com>
|
|
||||||
Date: Fri, 10 Apr 2015 14:09:53 +0200
|
|
||||||
Subject: QNAM: Fix upload corruptions when server closes connection
|
|
||||||
|
|
||||||
This patch fixes several upload corruptions if the server closes the connection
|
|
||||||
while/before we send data into it. They happen inside multiple places in the HTTP
|
|
||||||
layer and are explained in the comments.
|
|
||||||
Corruptions are:
|
|
||||||
* The upload byte device has an in-flight signal with pending upload data, if
|
|
||||||
it gets reset (because server closes the connection) then the re-send of the
|
|
||||||
request was sometimes taking this stale in-flight pending upload data.
|
|
||||||
* Because some signals were DirectConnection and some were QueuedConnection, there
|
|
||||||
was a chance that a direct signal overtakes a queued signal. The state machine
|
|
||||||
then sent data down the socket which was buffered there (and sent later) although
|
|
||||||
it did not match the current state of the state machine when it was actually sent.
|
|
||||||
* A socket was seen as being able to have requests sent even though it was not
|
|
||||||
encrypted yet. This relates to the previous corruption where data is stored inside
|
|
||||||
the socket's buffer and then sent later.
|
|
||||||
|
|
||||||
The included auto test produces all fixed corruptions, I detected no regressions
|
|
||||||
via the other tests.
|
|
||||||
This code also adds a bit of sanity checking to protect from possible further
|
|
||||||
problems.
|
|
||||||
|
|
||||||
[ChangeLog][QtNetwork] Fix HTTP(s) upload corruption when server closes connection
|
|
||||||
|
|
||||||
Change-Id: I54c883925ec897050941498f139c4b523030432e
|
|
||||||
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
|
|
||||||
---
|
|
||||||
src/corelib/io/qnoncontiguousbytedevice.cpp | 18 +++
|
|
||||||
src/corelib/io/qnoncontiguousbytedevice_p.h | 4 +
|
|
||||||
.../access/qhttpnetworkconnectionchannel.cpp | 35 ++++-
|
|
||||||
.../access/qhttpnetworkconnectionchannel_p.h | 2 +
|
|
||||||
src/network/access/qhttpprotocolhandler.cpp | 7 +
|
|
||||||
src/network/access/qhttpthreaddelegate_p.h | 36 ++++-
|
|
||||||
src/network/access/qnetworkreplyhttpimpl.cpp | 25 ++-
|
|
||||||
src/network/access/qnetworkreplyhttpimpl_p.h | 7 +-
|
|
||||||
.../access/qnetworkreply/tst_qnetworkreply.cpp | 175 ++++++++++++++++++++-
|
|
||||||
9 files changed, 279 insertions(+), 30 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
|
|
||||||
index 11510a8..760ca3d 100644
|
|
||||||
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
|
|
||||||
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
|
|
||||||
@@ -236,6 +236,11 @@ qint64 QNonContiguousByteDeviceByteArrayImpl::size()
|
|
||||||
return byteArray->size();
|
|
||||||
}
|
|
||||||
|
|
||||||
+qint64 QNonContiguousByteDeviceByteArrayImpl::pos()
|
|
||||||
+{
|
|
||||||
+ return currentPosition;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QNonContiguousByteDeviceRingBufferImpl::QNonContiguousByteDeviceRingBufferImpl(QSharedPointer<QRingBuffer> rb)
|
|
||||||
: QNonContiguousByteDevice(), currentPosition(0)
|
|
||||||
{
|
|
||||||
@@ -273,6 +278,11 @@ bool QNonContiguousByteDeviceRingBufferImpl::atEnd()
|
|
||||||
return currentPosition >= size();
|
|
||||||
}
|
|
||||||
|
|
||||||
+qint64 QNonContiguousByteDeviceRingBufferImpl::pos()
|
|
||||||
+{
|
|
||||||
+ return currentPosition;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool QNonContiguousByteDeviceRingBufferImpl::reset()
|
|
||||||
{
|
|
||||||
if (resetDisabled)
|
|
||||||
@@ -406,6 +416,14 @@ qint64 QNonContiguousByteDeviceIoDeviceImpl::size()
|
|
||||||
return device->size() - initialPosition;
|
|
||||||
}
|
|
||||||
|
|
||||||
+qint64 QNonContiguousByteDeviceIoDeviceImpl::pos()
|
|
||||||
+{
|
|
||||||
+ if (device->isSequential())
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ return device->pos();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QByteDeviceWrappingIoDevice::QByteDeviceWrappingIoDevice(QNonContiguousByteDevice *bd) : QIODevice((QObject*)0)
|
|
||||||
{
|
|
||||||
byteDevice = bd;
|
|
||||||
diff --git a/src/corelib/io/qnoncontiguousbytedevice_p.h b/src/corelib/io/qnoncontiguousbytedevice_p.h
|
|
||||||
index c05ae11..4d7b7b0 100644
|
|
||||||
--- a/src/corelib/io/qnoncontiguousbytedevice_p.h
|
|
||||||
+++ b/src/corelib/io/qnoncontiguousbytedevice_p.h
|
|
||||||
@@ -61,6 +61,7 @@ public:
|
|
||||||
virtual const char* readPointer(qint64 maximumLength, qint64 &len) = 0;
|
|
||||||
virtual bool advanceReadPointer(qint64 amount) = 0;
|
|
||||||
virtual bool atEnd() = 0;
|
|
||||||
+ virtual qint64 pos() { return -1; }
|
|
||||||
virtual bool reset() = 0;
|
|
||||||
void disableReset();
|
|
||||||
bool isResetDisabled() { return resetDisabled; }
|
|
||||||
@@ -106,6 +107,7 @@ public:
|
|
||||||
bool atEnd();
|
|
||||||
bool reset();
|
|
||||||
qint64 size();
|
|
||||||
+ qint64 pos() Q_DECL_OVERRIDE;
|
|
||||||
protected:
|
|
||||||
QByteArray* byteArray;
|
|
||||||
qint64 currentPosition;
|
|
||||||
@@ -121,6 +123,7 @@ public:
|
|
||||||
bool atEnd();
|
|
||||||
bool reset();
|
|
||||||
qint64 size();
|
|
||||||
+ qint64 pos() Q_DECL_OVERRIDE;
|
|
||||||
protected:
|
|
||||||
QSharedPointer<QRingBuffer> ringBuffer;
|
|
||||||
qint64 currentPosition;
|
|
||||||
@@ -138,6 +141,7 @@ public:
|
|
||||||
bool atEnd();
|
|
||||||
bool reset();
|
|
||||||
qint64 size();
|
|
||||||
+ qint64 pos() Q_DECL_OVERRIDE;
|
|
||||||
protected:
|
|
||||||
QIODevice* device;
|
|
||||||
QByteArray* currentReadBuffer;
|
|
||||||
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
||||||
index 9f63280..49c6793 100644
|
|
||||||
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
||||||
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
|
|
||||||
@@ -106,15 +106,19 @@ void QHttpNetworkConnectionChannel::init()
|
|
||||||
socket->setProxy(QNetworkProxy::NoProxy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ // We want all signals (except the interactive ones) be connected as QueuedConnection
|
|
||||||
+ // because else we're falling into cases where we recurse back into the socket code
|
|
||||||
+ // and mess up the state. Always going to the event loop (and expecting that when reading/writing)
|
|
||||||
+ // is safer.
|
|
||||||
QObject::connect(socket, SIGNAL(bytesWritten(qint64)),
|
|
||||||
this, SLOT(_q_bytesWritten(qint64)),
|
|
||||||
- Qt::DirectConnection);
|
|
||||||
+ Qt::QueuedConnection);
|
|
||||||
QObject::connect(socket, SIGNAL(connected()),
|
|
||||||
this, SLOT(_q_connected()),
|
|
||||||
- Qt::DirectConnection);
|
|
||||||
+ Qt::QueuedConnection);
|
|
||||||
QObject::connect(socket, SIGNAL(readyRead()),
|
|
||||||
this, SLOT(_q_readyRead()),
|
|
||||||
- Qt::DirectConnection);
|
|
||||||
+ Qt::QueuedConnection);
|
|
||||||
|
|
||||||
// The disconnected() and error() signals may already come
|
|
||||||
// while calling connectToHost().
|
|
||||||
@@ -143,13 +147,13 @@ void QHttpNetworkConnectionChannel::init()
|
|
||||||
// won't be a sslSocket if encrypt is false
|
|
||||||
QObject::connect(sslSocket, SIGNAL(encrypted()),
|
|
||||||
this, SLOT(_q_encrypted()),
|
|
||||||
- Qt::DirectConnection);
|
|
||||||
+ Qt::QueuedConnection);
|
|
||||||
QObject::connect(sslSocket, SIGNAL(sslErrors(QList<QSslError>)),
|
|
||||||
this, SLOT(_q_sslErrors(QList<QSslError>)),
|
|
||||||
Qt::DirectConnection);
|
|
||||||
QObject::connect(sslSocket, SIGNAL(encryptedBytesWritten(qint64)),
|
|
||||||
this, SLOT(_q_encryptedBytesWritten(qint64)),
|
|
||||||
- Qt::DirectConnection);
|
|
||||||
+ Qt::QueuedConnection);
|
|
||||||
|
|
||||||
if (ignoreAllSslErrors)
|
|
||||||
sslSocket->ignoreSslErrors();
|
|
||||||
@@ -186,8 +190,11 @@ void QHttpNetworkConnectionChannel::close()
|
|
||||||
// pendingEncrypt must only be true in between connected and encrypted states
|
|
||||||
pendingEncrypt = false;
|
|
||||||
|
|
||||||
- if (socket)
|
|
||||||
+ if (socket) {
|
|
||||||
+ // socket can be 0 since the host lookup is done from qhttpnetworkconnection.cpp while
|
|
||||||
+ // there is no socket yet.
|
|
||||||
socket->close();
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -353,6 +360,14 @@ bool QHttpNetworkConnectionChannel::ensureConnection()
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // This code path for ConnectedState
|
|
||||||
+ if (pendingEncrypt) {
|
|
||||||
+ // Let's only be really connected when we have received the encrypted() signal. Else the state machine seems to mess up
|
|
||||||
+ // and corrupt the things sent to the server.
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -659,6 +674,12 @@ bool QHttpNetworkConnectionChannel::isSocketReading() const
|
|
||||||
void QHttpNetworkConnectionChannel::_q_bytesWritten(qint64 bytes)
|
|
||||||
{
|
|
||||||
Q_UNUSED(bytes);
|
|
||||||
+ if (ssl) {
|
|
||||||
+ // In the SSL case we want to send data from encryptedBytesWritten signal since that one
|
|
||||||
+ // is the one going down to the actual network, not only into some SSL buffer.
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// bytes have been written to the socket. write even more of them :)
|
|
||||||
if (isSocketWriting())
|
|
||||||
sendRequest();
|
|
||||||
@@ -734,7 +755,7 @@ void QHttpNetworkConnectionChannel::_q_connected()
|
|
||||||
|
|
||||||
// ### FIXME: if the server closes the connection unexpectedly, we shouldn't send the same broken request again!
|
|
||||||
//channels[i].reconnectAttempts = 2;
|
|
||||||
- if (pendingEncrypt) {
|
|
||||||
+ if (ssl || pendingEncrypt) { // FIXME: Didn't work properly with pendingEncrypt only, we should refactor this into an EncrypingState
|
|
||||||
#ifndef QT_NO_SSL
|
|
||||||
if (connection->sslContext().isNull()) {
|
|
||||||
// this socket is making the 1st handshake for this connection,
|
|
||||||
diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h
|
|
||||||
index 692c0e6..231fe11 100644
|
|
||||||
--- a/src/network/access/qhttpnetworkconnectionchannel_p.h
|
|
||||||
+++ b/src/network/access/qhttpnetworkconnectionchannel_p.h
|
|
||||||
@@ -83,6 +83,8 @@ typedef QPair<QHttpNetworkRequest, QHttpNetworkReply*> HttpMessagePair;
|
|
||||||
class QHttpNetworkConnectionChannel : public QObject {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
+ // TODO: Refactor this to add an EncryptingState (and remove pendingEncrypt).
|
|
||||||
+ // Also add an Unconnected state so IdleState does not have double meaning.
|
|
||||||
enum ChannelState {
|
|
||||||
IdleState = 0, // ready to send request
|
|
||||||
ConnectingState = 1, // connecting to host
|
|
||||||
diff --git a/src/network/access/qhttpprotocolhandler.cpp b/src/network/access/qhttpprotocolhandler.cpp
|
|
||||||
index 28e10f7..3357948 100644
|
|
||||||
--- a/src/network/access/qhttpprotocolhandler.cpp
|
|
||||||
+++ b/src/network/access/qhttpprotocolhandler.cpp
|
|
||||||
@@ -368,6 +368,13 @@ bool QHttpProtocolHandler::sendRequest()
|
|
||||||
// nothing to read currently, break the loop
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
+ if (m_channel->written != uploadByteDevice->pos()) {
|
|
||||||
+ // Sanity check. This was useful in tracking down an upload corruption.
|
|
||||||
+ qWarning() << "QHttpProtocolHandler: Internal error in sendRequest. Expected to write at position" << m_channel->written << "but read device is at" << uploadByteDevice->pos();
|
|
||||||
+ Q_ASSERT(m_channel->written == uploadByteDevice->pos());
|
|
||||||
+ m_connection->d_func()->emitReplyError(m_socket, m_reply, QNetworkReply::ProtocolFailure);
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
qint64 currentWriteSize = m_socket->write(readPointer, currentReadSize);
|
|
||||||
if (currentWriteSize == -1 || currentWriteSize != currentReadSize) {
|
|
||||||
// socket broke down
|
|
||||||
diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h
|
|
||||||
index 1661082..b553409 100644
|
|
||||||
--- a/src/network/access/qhttpthreaddelegate_p.h
|
|
||||||
+++ b/src/network/access/qhttpthreaddelegate_p.h
|
|
||||||
@@ -187,6 +187,7 @@ protected:
|
|
||||||
QByteArray m_dataArray;
|
|
||||||
bool m_atEnd;
|
|
||||||
qint64 m_size;
|
|
||||||
+ qint64 m_pos; // to match calls of haveDataSlot with the expected position
|
|
||||||
public:
|
|
||||||
QNonContiguousByteDeviceThreadForwardImpl(bool aE, qint64 s)
|
|
||||||
: QNonContiguousByteDevice(),
|
|
||||||
@@ -194,7 +195,8 @@ public:
|
|
||||||
m_amount(0),
|
|
||||||
m_data(0),
|
|
||||||
m_atEnd(aE),
|
|
||||||
- m_size(s)
|
|
||||||
+ m_size(s),
|
|
||||||
+ m_pos(0)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -202,6 +204,11 @@ public:
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
+ qint64 pos() Q_DECL_OVERRIDE
|
|
||||||
+ {
|
|
||||||
+ return m_pos;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
const char* readPointer(qint64 maximumLength, qint64 &len)
|
|
||||||
{
|
|
||||||
if (m_amount > 0) {
|
|
||||||
@@ -229,11 +236,10 @@ public:
|
|
||||||
|
|
||||||
m_amount -= a;
|
|
||||||
m_data += a;
|
|
||||||
+ m_pos += a;
|
|
||||||
|
|
||||||
- // To main thread to inform about our state
|
|
||||||
- emit processedData(a);
|
|
||||||
-
|
|
||||||
- // FIXME possible optimization, already ask user thread for some data
|
|
||||||
+ // To main thread to inform about our state. The m_pos will be sent as a sanity check.
|
|
||||||
+ emit processedData(m_pos, a);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -250,10 +256,21 @@ public:
|
|
||||||
{
|
|
||||||
m_amount = 0;
|
|
||||||
m_data = 0;
|
|
||||||
+ m_dataArray.clear();
|
|
||||||
+
|
|
||||||
+ if (wantDataPending) {
|
|
||||||
+ // had requested the user thread to send some data (only 1 in-flight at any moment)
|
|
||||||
+ wantDataPending = false;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
// Communicate as BlockingQueuedConnection
|
|
||||||
bool b = false;
|
|
||||||
emit resetData(&b);
|
|
||||||
+ if (b) {
|
|
||||||
+ // the reset succeeded, we're at pos 0 again
|
|
||||||
+ m_pos = 0;
|
|
||||||
+ // the HTTP code will anyway abort the request if !b.
|
|
||||||
+ }
|
|
||||||
return b;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -264,8 +281,13 @@ public:
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
// From user thread:
|
|
||||||
- void haveDataSlot(QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
|
|
||||||
+ void haveDataSlot(qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
|
|
||||||
{
|
|
||||||
+ if (pos != m_pos) {
|
|
||||||
+ // Sometimes when re-sending a request in the qhttpnetwork* layer there is a pending haveData from the
|
|
||||||
+ // user thread on the way to us. We need to ignore it since it is the data for the wrong(later) chunk.
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
wantDataPending = false;
|
|
||||||
|
|
||||||
m_dataArray = dataArray;
|
|
||||||
@@ -285,7 +307,7 @@ signals:
|
|
||||||
|
|
||||||
// to main thread:
|
|
||||||
void wantData(qint64);
|
|
||||||
- void processedData(qint64);
|
|
||||||
+ void processedData(qint64 pos, qint64 amount);
|
|
||||||
void resetData(bool *b);
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/src/network/access/qnetworkreplyhttpimpl.cpp b/src/network/access/qnetworkreplyhttpimpl.cpp
|
|
||||||
index 4ce7303..974a101 100644
|
|
||||||
--- a/src/network/access/qnetworkreplyhttpimpl.cpp
|
|
||||||
+++ b/src/network/access/qnetworkreplyhttpimpl.cpp
|
|
||||||
@@ -424,6 +424,7 @@ QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate()
|
|
||||||
, synchronous(false)
|
|
||||||
, state(Idle)
|
|
||||||
, statusCode(0)
|
|
||||||
+ , uploadByteDevicePosition(false)
|
|
||||||
, uploadDeviceChoking(false)
|
|
||||||
, outgoingData(0)
|
|
||||||
, bytesUploaded(-1)
|
|
||||||
@@ -863,9 +864,9 @@ void QNetworkReplyHttpImplPrivate::postRequest()
|
|
||||||
q, SLOT(uploadByteDeviceReadyReadSlot()),
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
|
|
||||||
- // From main thread to user thread:
|
|
||||||
- QObject::connect(q, SIGNAL(haveUploadData(QByteArray,bool,qint64)),
|
|
||||||
- forwardUploadDevice, SLOT(haveDataSlot(QByteArray,bool,qint64)), Qt::QueuedConnection);
|
|
||||||
+ // From user thread to http thread:
|
|
||||||
+ QObject::connect(q, SIGNAL(haveUploadData(qint64,QByteArray,bool,qint64)),
|
|
||||||
+ forwardUploadDevice, SLOT(haveDataSlot(qint64,QByteArray,bool,qint64)), Qt::QueuedConnection);
|
|
||||||
QObject::connect(uploadByteDevice.data(), SIGNAL(readyRead()),
|
|
||||||
forwardUploadDevice, SIGNAL(readyRead()),
|
|
||||||
Qt::QueuedConnection);
|
|
||||||
@@ -873,8 +874,8 @@ void QNetworkReplyHttpImplPrivate::postRequest()
|
|
||||||
// From http thread to user thread:
|
|
||||||
QObject::connect(forwardUploadDevice, SIGNAL(wantData(qint64)),
|
|
||||||
q, SLOT(wantUploadDataSlot(qint64)));
|
|
||||||
- QObject::connect(forwardUploadDevice, SIGNAL(processedData(qint64)),
|
|
||||||
- q, SLOT(sentUploadDataSlot(qint64)));
|
|
||||||
+ QObject::connect(forwardUploadDevice,SIGNAL(processedData(qint64, qint64)),
|
|
||||||
+ q, SLOT(sentUploadDataSlot(qint64,qint64)));
|
|
||||||
QObject::connect(forwardUploadDevice, SIGNAL(resetData(bool*)),
|
|
||||||
q, SLOT(resetUploadDataSlot(bool*)),
|
|
||||||
Qt::BlockingQueuedConnection); // this is the only one with BlockingQueued!
|
|
||||||
@@ -1268,12 +1269,22 @@ void QNetworkReplyHttpImplPrivate::replySslConfigurationChanged(const QSslConfig
|
|
||||||
void QNetworkReplyHttpImplPrivate::resetUploadDataSlot(bool *r)
|
|
||||||
{
|
|
||||||
*r = uploadByteDevice->reset();
|
|
||||||
+ if (*r) {
|
|
||||||
+ // reset our own position which is used for the inter-thread communication
|
|
||||||
+ uploadByteDevicePosition = 0;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
// Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
|
|
||||||
-void QNetworkReplyHttpImplPrivate::sentUploadDataSlot(qint64 amount)
|
|
||||||
+void QNetworkReplyHttpImplPrivate::sentUploadDataSlot(qint64 pos, qint64 amount)
|
|
||||||
{
|
|
||||||
+ if (uploadByteDevicePosition + amount != pos) {
|
|
||||||
+ // Sanity check, should not happen.
|
|
||||||
+ error(QNetworkReply::UnknownNetworkError, "");
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
uploadByteDevice->advanceReadPointer(amount);
|
|
||||||
+ uploadByteDevicePosition += amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread
|
|
||||||
@@ -1298,7 +1309,7 @@ void QNetworkReplyHttpImplPrivate::wantUploadDataSlot(qint64 maxSize)
|
|
||||||
QByteArray dataArray(data, currentUploadDataLength);
|
|
||||||
|
|
||||||
// Communicate back to HTTP thread
|
|
||||||
- emit q->haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
|
|
||||||
+ emit q->haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size());
|
|
||||||
}
|
|
||||||
|
|
||||||
void QNetworkReplyHttpImplPrivate::uploadByteDeviceReadyReadSlot()
|
|
||||||
diff --git a/src/network/access/qnetworkreplyhttpimpl_p.h b/src/network/access/qnetworkreplyhttpimpl_p.h
|
|
||||||
index 77d9c5a..1940922 100644
|
|
||||||
--- a/src/network/access/qnetworkreplyhttpimpl_p.h
|
|
||||||
+++ b/src/network/access/qnetworkreplyhttpimpl_p.h
|
|
||||||
@@ -120,7 +120,7 @@ public:
|
|
||||||
|
|
||||||
Q_PRIVATE_SLOT(d_func(), void resetUploadDataSlot(bool *r))
|
|
||||||
Q_PRIVATE_SLOT(d_func(), void wantUploadDataSlot(qint64))
|
|
||||||
- Q_PRIVATE_SLOT(d_func(), void sentUploadDataSlot(qint64))
|
|
||||||
+ Q_PRIVATE_SLOT(d_func(), void sentUploadDataSlot(qint64,qint64))
|
|
||||||
Q_PRIVATE_SLOT(d_func(), void uploadByteDeviceReadyReadSlot())
|
|
||||||
Q_PRIVATE_SLOT(d_func(), void emitReplyUploadProgress(qint64, qint64))
|
|
||||||
Q_PRIVATE_SLOT(d_func(), void _q_cacheSaveDeviceAboutToClose())
|
|
||||||
@@ -144,7 +144,7 @@ signals:
|
|
||||||
|
|
||||||
void startHttpRequestSynchronously();
|
|
||||||
|
|
||||||
- void haveUploadData(QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
|
|
||||||
+ void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
|
|
||||||
};
|
|
||||||
|
|
||||||
class QNetworkReplyHttpImplPrivate: public QNetworkReplyPrivate
|
|
||||||
@@ -195,6 +195,7 @@ public:
|
|
||||||
// upload
|
|
||||||
QNonContiguousByteDevice* createUploadByteDevice();
|
|
||||||
QSharedPointer<QNonContiguousByteDevice> uploadByteDevice;
|
|
||||||
+ qint64 uploadByteDevicePosition;
|
|
||||||
bool uploadDeviceChoking; // if we couldn't readPointer() any data at the moment
|
|
||||||
QIODevice *outgoingData;
|
|
||||||
QSharedPointer<QRingBuffer> outgoingDataBuffer;
|
|
||||||
@@ -283,7 +284,7 @@ public:
|
|
||||||
// From QNonContiguousByteDeviceThreadForwardImpl in HTTP thread:
|
|
||||||
void resetUploadDataSlot(bool *r);
|
|
||||||
void wantUploadDataSlot(qint64);
|
|
||||||
- void sentUploadDataSlot(qint64);
|
|
||||||
+ void sentUploadDataSlot(qint64, qint64);
|
|
||||||
|
|
||||||
// From user's QNonContiguousByteDevice
|
|
||||||
void uploadByteDeviceReadyReadSlot();
|
|
||||||
diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
|
|
||||||
index 3ccedf6..d2edf67 100644
|
|
||||||
--- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
|
|
||||||
+++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
|
|
||||||
@@ -457,6 +457,10 @@ private Q_SLOTS:
|
|
||||||
|
|
||||||
void putWithRateLimiting();
|
|
||||||
|
|
||||||
+#ifndef QT_NO_SSL
|
|
||||||
+ void putWithServerClosingConnectionImmediately();
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
// NOTE: This test must be last!
|
|
||||||
void parentingRepliesToTheApp();
|
|
||||||
private:
|
|
||||||
@@ -4718,18 +4722,22 @@ void tst_QNetworkReply::ioPostToHttpNoBufferFlag()
|
|
||||||
class SslServer : public QTcpServer {
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
- SslServer() : socket(0) {};
|
|
||||||
+ SslServer() : socket(0), m_ssl(true) {}
|
|
||||||
void incomingConnection(qintptr socketDescriptor) {
|
|
||||||
QSslSocket *serverSocket = new QSslSocket;
|
|
||||||
serverSocket->setParent(this);
|
|
||||||
|
|
||||||
if (serverSocket->setSocketDescriptor(socketDescriptor)) {
|
|
||||||
+ connect(serverSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
|
|
||||||
+ if (!m_ssl) {
|
|
||||||
+ emit newPlainConnection(serverSocket);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
QString testDataDir = QFileInfo(QFINDTESTDATA("rfc3252.txt")).absolutePath();
|
|
||||||
if (testDataDir.isEmpty())
|
|
||||||
testDataDir = QCoreApplication::applicationDirPath();
|
|
||||||
|
|
||||||
connect(serverSocket, SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
|
|
||||||
- connect(serverSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
|
|
||||||
serverSocket->setProtocol(QSsl::AnyProtocol);
|
|
||||||
connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), serverSocket, SLOT(ignoreSslErrors()));
|
|
||||||
serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
|
|
||||||
@@ -4740,11 +4748,12 @@ public:
|
|
||||||
}
|
|
||||||
}
|
|
||||||
signals:
|
|
||||||
- void newEncryptedConnection();
|
|
||||||
+ void newEncryptedConnection(QSslSocket *s);
|
|
||||||
+ void newPlainConnection(QSslSocket *s);
|
|
||||||
public slots:
|
|
||||||
void encryptedSlot() {
|
|
||||||
socket = (QSslSocket*) sender();
|
|
||||||
- emit newEncryptedConnection();
|
|
||||||
+ emit newEncryptedConnection(socket);
|
|
||||||
}
|
|
||||||
void readyReadSlot() {
|
|
||||||
// for the incoming sockets, not the server socket
|
|
||||||
@@ -4753,6 +4762,7 @@ public slots:
|
|
||||||
|
|
||||||
public:
|
|
||||||
QSslSocket *socket;
|
|
||||||
+ bool m_ssl;
|
|
||||||
};
|
|
||||||
|
|
||||||
// very similar to ioPostToHttpUploadProgress but for SSL
|
|
||||||
@@ -4780,7 +4790,7 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress()
|
|
||||||
QNetworkReplyPtr reply(manager.post(request, sourceFile));
|
|
||||||
|
|
||||||
QSignalSpy spy(reply.data(), SIGNAL(uploadProgress(qint64,qint64)));
|
|
||||||
- connect(&server, SIGNAL(newEncryptedConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
|
||||||
+ connect(&server, SIGNAL(newEncryptedConnection(QSslSocket*)), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
|
||||||
connect(reply, SIGNAL(sslErrors(QList<QSslError>)), reply.data(), SLOT(ignoreSslErrors()));
|
|
||||||
|
|
||||||
// get the request started and the incoming socket connected
|
|
||||||
@@ -4788,7 +4798,7 @@ void tst_QNetworkReply::ioPostToHttpsUploadProgress()
|
|
||||||
QVERIFY(!QTestEventLoop::instance().timeout());
|
|
||||||
QTcpSocket *incomingSocket = server.socket;
|
|
||||||
QVERIFY(incomingSocket);
|
|
||||||
- disconnect(&server, SIGNAL(newEncryptedConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
|
||||||
+ disconnect(&server, SIGNAL(newEncryptedConnection(QSslSocket*)), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
|
||||||
|
|
||||||
|
|
||||||
incomingSocket->setReadBufferSize(1*1024);
|
|
||||||
@@ -7905,6 +7915,159 @@ void tst_QNetworkReply::putWithRateLimiting()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+#ifndef QT_NO_SSL
|
|
||||||
+
|
|
||||||
+class PutWithServerClosingConnectionImmediatelyHandler: public QObject
|
|
||||||
+{
|
|
||||||
+ Q_OBJECT
|
|
||||||
+public:
|
|
||||||
+ bool m_parsedHeaders;
|
|
||||||
+ QByteArray m_receivedData;
|
|
||||||
+ QByteArray m_expectedData;
|
|
||||||
+ QSslSocket *m_socket;
|
|
||||||
+ PutWithServerClosingConnectionImmediatelyHandler(QSslSocket *s, QByteArray expected) :m_parsedHeaders(false), m_expectedData(expected), m_socket(s)
|
|
||||||
+ {
|
|
||||||
+ m_socket->setParent(this);
|
|
||||||
+ connect(m_socket, SIGNAL(readyRead()), SLOT(readyReadSlot()));
|
|
||||||
+ connect(m_socket, SIGNAL(disconnected()), SLOT(disconnectedSlot()));
|
|
||||||
+ }
|
|
||||||
+signals:
|
|
||||||
+ void correctFileUploadReceived();
|
|
||||||
+ void corruptFileUploadReceived();
|
|
||||||
+
|
|
||||||
+public slots:
|
|
||||||
+ void closeDelayed() {
|
|
||||||
+ m_socket->close();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ void readyReadSlot()
|
|
||||||
+ {
|
|
||||||
+ QByteArray data = m_socket->readAll();
|
|
||||||
+ m_receivedData += data;
|
|
||||||
+ if (!m_parsedHeaders && m_receivedData.contains("\r\n\r\n")) {
|
|
||||||
+ m_parsedHeaders = true;
|
|
||||||
+ QTimer::singleShot(qrand()%10, this, SLOT(closeDelayed())); // simulate random network latency
|
|
||||||
+ // This server simulates a web server connection closing, e.g. because of Apaches MaxKeepAliveRequests or KeepAliveTimeout
|
|
||||||
+ // In this case QNAM needs to re-send the upload data but it had a bug which then corrupts the upload
|
|
||||||
+ // This test catches that.
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ }
|
|
||||||
+ void disconnectedSlot()
|
|
||||||
+ {
|
|
||||||
+ if (m_parsedHeaders) {
|
|
||||||
+ //qDebug() << m_receivedData.left(m_receivedData.indexOf("\r\n\r\n"));
|
|
||||||
+ m_receivedData = m_receivedData.mid(m_receivedData.indexOf("\r\n\r\n")+4); // check only actual data
|
|
||||||
+ }
|
|
||||||
+ if (m_receivedData.length() > 0 && !m_expectedData.startsWith(m_receivedData)) {
|
|
||||||
+ // We had received some data but it is corrupt!
|
|
||||||
+ qDebug() << "CORRUPT" << m_receivedData.count();
|
|
||||||
+
|
|
||||||
+ // Use this to track down the pattern of the corruption and conclude the source
|
|
||||||
+// QFile a("/tmp/corrupt");
|
|
||||||
+// a.open(QIODevice::WriteOnly);
|
|
||||||
+// a.write(m_receivedData);
|
|
||||||
+// a.close();
|
|
||||||
+
|
|
||||||
+// QFile b("/tmp/correct");
|
|
||||||
+// b.open(QIODevice::WriteOnly);
|
|
||||||
+// b.write(m_expectedData);
|
|
||||||
+// b.close();
|
|
||||||
+ //exit(1);
|
|
||||||
+ emit corruptFileUploadReceived();
|
|
||||||
+ } else {
|
|
||||||
+ emit correctFileUploadReceived();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+class PutWithServerClosingConnectionImmediatelyServer: public SslServer
|
|
||||||
+{
|
|
||||||
+ Q_OBJECT
|
|
||||||
+public:
|
|
||||||
+ int m_correctUploads;
|
|
||||||
+ int m_corruptUploads;
|
|
||||||
+ int m_repliesFinished;
|
|
||||||
+ int m_expectedReplies;
|
|
||||||
+ QByteArray m_expectedData;
|
|
||||||
+ PutWithServerClosingConnectionImmediatelyServer() : SslServer(), m_correctUploads(0), m_corruptUploads(0), m_repliesFinished(0), m_expectedReplies(0)
|
|
||||||
+ {
|
|
||||||
+ QObject::connect(this, SIGNAL(newEncryptedConnection(QSslSocket*)), this, SLOT(createHandlerForConnection(QSslSocket*)));
|
|
||||||
+ QObject::connect(this, SIGNAL(newPlainConnection(QSslSocket*)), this, SLOT(createHandlerForConnection(QSslSocket*)));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+public slots:
|
|
||||||
+ void createHandlerForConnection(QSslSocket* s) {
|
|
||||||
+ PutWithServerClosingConnectionImmediatelyHandler *handler = new PutWithServerClosingConnectionImmediatelyHandler(s, m_expectedData);
|
|
||||||
+ handler->setParent(this);
|
|
||||||
+ QObject::connect(handler, SIGNAL(correctFileUploadReceived()), this, SLOT(increaseCorrect()));
|
|
||||||
+ QObject::connect(handler, SIGNAL(corruptFileUploadReceived()), this, SLOT(increaseCorrupt()));
|
|
||||||
+ }
|
|
||||||
+ void increaseCorrect() {
|
|
||||||
+ m_correctUploads++;
|
|
||||||
+ }
|
|
||||||
+ void increaseCorrupt() {
|
|
||||||
+ m_corruptUploads++;
|
|
||||||
+ }
|
|
||||||
+ void replyFinished() {
|
|
||||||
+ m_repliesFinished++;
|
|
||||||
+ if (m_repliesFinished == m_expectedReplies) {
|
|
||||||
+ QTestEventLoop::instance().exitLoop();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+void tst_QNetworkReply::putWithServerClosingConnectionImmediately()
|
|
||||||
+{
|
|
||||||
+ const int numUploads = 40;
|
|
||||||
+ qint64 wantedSize = 512*1024; // 512 kB
|
|
||||||
+ QByteArray sourceFile;
|
|
||||||
+ for (int i = 0; i < wantedSize; ++i) {
|
|
||||||
+ sourceFile += (char)'a' +(i%26);
|
|
||||||
+ }
|
|
||||||
+ bool withSsl = false;
|
|
||||||
+
|
|
||||||
+ for (int s = 0; s <= 1; s++) {
|
|
||||||
+ withSsl = (s == 1);
|
|
||||||
+ // Test also needs to run several times because of 9c2ecf89
|
|
||||||
+ for (int j = 0; j < 20; j++) {
|
|
||||||
+ // emulate a minimal https server
|
|
||||||
+ PutWithServerClosingConnectionImmediatelyServer server;
|
|
||||||
+ server.m_ssl = withSsl;
|
|
||||||
+ server.m_expectedData = sourceFile;
|
|
||||||
+ server.m_expectedReplies = numUploads;
|
|
||||||
+ server.listen(QHostAddress(QHostAddress::LocalHost), 0);
|
|
||||||
+
|
|
||||||
+ for (int i = 0; i < numUploads; i++) {
|
|
||||||
+ // create the request
|
|
||||||
+ QUrl url = QUrl(QString("http%1://127.0.0.1:%2/file=%3").arg(withSsl ? "s" : "").arg(server.serverPort()).arg(i));
|
|
||||||
+ QNetworkRequest request(url);
|
|
||||||
+ QNetworkReply *reply = manager.put(request, sourceFile);
|
|
||||||
+ connect(reply, SIGNAL(sslErrors(QList<QSslError>)), reply, SLOT(ignoreSslErrors()));
|
|
||||||
+ connect(reply, SIGNAL(finished()), &server, SLOT(replyFinished()));
|
|
||||||
+ reply->setParent(&server);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // get the request started and the incoming socket connected
|
|
||||||
+ QTestEventLoop::instance().enterLoop(10);
|
|
||||||
+
|
|
||||||
+ //qDebug() << "correct=" << server.m_correctUploads << "corrupt=" << server.m_corruptUploads << "expected=" <<numUploads;
|
|
||||||
+
|
|
||||||
+ // Sanity check because ecause of 9c2ecf89 most replies will error out but we want to make sure at least some of them worked
|
|
||||||
+ QVERIFY(server.m_correctUploads > 5);
|
|
||||||
+ // Because actually important is that we don't get any corruption:
|
|
||||||
+ QCOMPARE(server.m_corruptUploads, 0);
|
|
||||||
+
|
|
||||||
+ server.close();
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
// NOTE: This test must be last testcase in tst_qnetworkreply!
|
|
||||||
void tst_QNetworkReply::parentingRepliesToTheApp()
|
|
||||||
--
|
|
||||||
cgit v0.11.0
|
|
@ -1,111 +0,0 @@
|
|||||||
From f58e882b7594c59b6050d3c87562fcf836d10f60 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Olivier Goffart <ogoffart@woboq.com>
|
|
||||||
Date: Tue, 14 Apr 2015 10:58:26 +0200
|
|
||||||
Subject: QLockFile: fix deadlock when the lock file is corrupted
|
|
||||||
|
|
||||||
[ChangeLog][QtCore][QLockFile] Fixed a deadlock when the lock file
|
|
||||||
is corrupted.
|
|
||||||
|
|
||||||
Task-number: QTBUG-44771
|
|
||||||
Change-Id: Ic490b09d70ff1cc1733b64949889a73720b2d0f3
|
|
||||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
|
||||||
---
|
|
||||||
src/corelib/io/qlockfile_unix.cpp | 10 +++++-----
|
|
||||||
src/corelib/io/qlockfile_win.cpp | 22 +++++++++++-----------
|
|
||||||
tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp | 17 +++++++++++++++++
|
|
||||||
3 files changed, 33 insertions(+), 16 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp
|
|
||||||
index bf1015a..dc9f8f7 100644
|
|
||||||
--- a/src/corelib/io/qlockfile_unix.cpp
|
|
||||||
+++ b/src/corelib/io/qlockfile_unix.cpp
|
|
||||||
@@ -181,11 +181,11 @@ bool QLockFilePrivate::isApparentlyStale() const
|
|
||||||
{
|
|
||||||
qint64 pid;
|
|
||||||
QString hostname, appname;
|
|
||||||
- if (!getLockInfo(&pid, &hostname, &appname))
|
|
||||||
- return false;
|
|
||||||
- if (hostname.isEmpty() || hostname == QString::fromLocal8Bit(localHostName())) {
|
|
||||||
- if (::kill(pid, 0) == -1 && errno == ESRCH)
|
|
||||||
- return true; // PID doesn't exist anymore
|
|
||||||
+ if (getLockInfo(&pid, &hostname, &appname)) {
|
|
||||||
+ if (hostname.isEmpty() || hostname == QString::fromLocal8Bit(localHostName())) {
|
|
||||||
+ if (::kill(pid, 0) == -1 && errno == ESRCH)
|
|
||||||
+ return true; // PID doesn't exist anymore
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
const qint64 age = QFileInfo(fileName).lastModified().msecsTo(QDateTime::currentDateTime());
|
|
||||||
return staleLockTime > 0 && age > staleLockTime;
|
|
||||||
diff --git a/src/corelib/io/qlockfile_win.cpp b/src/corelib/io/qlockfile_win.cpp
|
|
||||||
index f9f2909..3587c7b 100644
|
|
||||||
--- a/src/corelib/io/qlockfile_win.cpp
|
|
||||||
+++ b/src/corelib/io/qlockfile_win.cpp
|
|
||||||
@@ -115,21 +115,21 @@ bool QLockFilePrivate::isApparentlyStale() const
|
|
||||||
{
|
|
||||||
qint64 pid;
|
|
||||||
QString hostname, appname;
|
|
||||||
- if (!getLockInfo(&pid, &hostname, &appname))
|
|
||||||
- return false;
|
|
||||||
|
|
||||||
// On WinRT there seems to be no way of obtaining information about other
|
|
||||||
// processes due to sandboxing
|
|
||||||
#ifndef Q_OS_WINRT
|
|
||||||
- if (hostname == QString::fromLocal8Bit(localHostName())) {
|
|
||||||
- HANDLE procHandle = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
|
||||||
- if (!procHandle)
|
|
||||||
- return true;
|
|
||||||
- // We got a handle but check if process is still alive
|
|
||||||
- DWORD dwR = ::WaitForSingleObject(procHandle, 0);
|
|
||||||
- ::CloseHandle(procHandle);
|
|
||||||
- if (dwR == WAIT_TIMEOUT)
|
|
||||||
- return true;
|
|
||||||
+ if (getLockInfo(&pid, &hostname, &appname)) {
|
|
||||||
+ if (hostname == QString::fromLocal8Bit(localHostName())) {
|
|
||||||
+ HANDLE procHandle = ::OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
|
||||||
+ if (!procHandle)
|
|
||||||
+ return true;
|
|
||||||
+ // We got a handle but check if process is still alive
|
|
||||||
+ DWORD dwR = ::WaitForSingleObject(procHandle, 0);
|
|
||||||
+ ::CloseHandle(procHandle);
|
|
||||||
+ if (dwR == WAIT_TIMEOUT)
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
#endif // !Q_OS_WINRT
|
|
||||||
const qint64 age = QFileInfo(fileName).lastModified().msecsTo(QDateTime::currentDateTime());
|
|
||||||
diff --git a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
|
|
||||||
index 77bef94..12bea67 100644
|
|
||||||
--- a/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
|
|
||||||
+++ b/tests/auto/corelib/io/qlockfile/tst_qlockfile.cpp
|
|
||||||
@@ -58,6 +58,7 @@ private slots:
|
|
||||||
void staleLongLockFromBusyProcess();
|
|
||||||
void staleLockRace();
|
|
||||||
void noPermissions();
|
|
||||||
+ void corruptedLockFile();
|
|
||||||
|
|
||||||
public:
|
|
||||||
QString m_helperApp;
|
|
||||||
@@ -415,5 +416,21 @@ void tst_QLockFile::noPermissions()
|
|
||||||
QCOMPARE(int(lockFile.error()), int(QLockFile::PermissionError));
|
|
||||||
}
|
|
||||||
|
|
||||||
+void tst_QLockFile::corruptedLockFile()
|
|
||||||
+{
|
|
||||||
+ const QString fileName = dir.path() + "/corruptedLockFile";
|
|
||||||
+
|
|
||||||
+ {
|
|
||||||
+ // Create a empty file. Typically the result of a computer crash or hard disk full.
|
|
||||||
+ QFile file(fileName);
|
|
||||||
+ QVERIFY(file.open(QFile::WriteOnly));
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ QLockFile secondLock(fileName);
|
|
||||||
+ secondLock.setStaleLockTime(100);
|
|
||||||
+ QVERIFY(secondLock.tryLock(10000));
|
|
||||||
+ QCOMPARE(int(secondLock.error()), int(QLockFile::NoError));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QTEST_MAIN(tst_QLockFile)
|
|
||||||
#include "tst_qlockfile.moc"
|
|
||||||
--
|
|
||||||
cgit v0.11.0
|
|
@ -1,36 +0,0 @@
|
|||||||
From a95b2e88603ecd18d54c384869ff1281e569f556 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= <mgraesslin@kde.org>
|
|
||||||
Date: Fri, 6 Feb 2015 07:34:43 +0100
|
|
||||||
Subject: [PATCH] Handle SelectionWindowDestroy in QXcbClipboard
|
|
||||||
|
|
||||||
This change is related to 6a7ee92b3958e3a3ebc16be15f8bd34217ec7bd2
|
|
||||||
which added handling for SelectionClientClose. Further testing showed
|
|
||||||
that with e.g. Qt 4 applications the SelectionClientClose is not
|
|
||||||
emitted, but the selection window seems to be destroyed before the
|
|
||||||
client is destroyed.
|
|
||||||
|
|
||||||
Fur a destroyed selection window the same applies: the clipboard
|
|
||||||
content is no longer valid and we should emit the changed signal.
|
|
||||||
|
|
||||||
Change-Id: Id3778a28b9f5601bf2c6e0106981316e0efa6e7c
|
|
||||||
---
|
|
||||||
src/plugins/platforms/xcb/qxcbclipboard.cpp | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
||||||
index f56a29d..4b6caa9 100644
|
|
||||||
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
||||||
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
|
|
||||||
@@ -742,7 +742,8 @@ void QXcbClipboard::handleXFixesSelectionRequest(xcb_xfixes_selection_notify_eve
|
|
||||||
m_xClipboard[mode]->reset();
|
|
||||||
}
|
|
||||||
emitChanged(mode);
|
|
||||||
- } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE)
|
|
||||||
+ } else if (event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE ||
|
|
||||||
+ event->subtype == XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY)
|
|
||||||
emitChanged(mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.1.4
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From 3eca75de67b3fd2c890715b30c7899cebc096fe9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
Date: Mon, 11 May 2015 18:30:00 +0900
|
|
||||||
Subject: Make qglobal.h complain if you use -fPIE
|
|
||||||
|
|
||||||
Prior to Qt 5.4.2 (commit 36d6eb721e7d5997ade75e289d4088dc48678d0d), we
|
|
||||||
allowed it, but now we need to enforce that it is not used. Note that
|
|
||||||
-fPIE does define __PIC__, so we need this to catch the use of -fPIE.
|
|
||||||
|
|
||||||
[ChangeLog][Important Behavior Changes] On x86 and x86-64 systems with
|
|
||||||
ELF binaries (especially Linux), due to a new optimization in GCC 5.x in
|
|
||||||
combination with a recent version of GNU binutils, compiling Qt
|
|
||||||
applications with -fPIE is no longer enough. Applications now need to be
|
|
||||||
compiled with the -fPIC option if Qt's option "reduce relocations" is
|
|
||||||
active. Note that Clang is known to generate incompatible code even with
|
|
||||||
-fPIC if the -flto option is active.
|
|
||||||
|
|
||||||
Task-number: QTBUG-45755
|
|
||||||
Change-Id: I66a35ce5f88941f29aa6ffff13dd210e0aa2728f
|
|
||||||
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
|
|
||||||
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
||||||
---
|
|
||||||
src/corelib/global/qglobal.h | 4 ++--
|
|
||||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
|
|
||||||
index ef84662..4547877 100644
|
|
||||||
--- a/src/corelib/global/qglobal.h
|
|
||||||
+++ b/src/corelib/global/qglobal.h
|
|
||||||
@@ -1047,9 +1047,9 @@ Q_CORE_EXPORT int qrand();
|
|
||||||
# define QT_NO_SHAREDMEMORY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__)
|
|
||||||
+#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && (!defined(__PIC__) || defined(__PIE__))
|
|
||||||
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
|
|
||||||
- "Compile your code with -fPIC."
|
|
||||||
+ "Compile your code with -fPIC (-fPIE is not enough)."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace QtPrivate {
|
|
||||||
--
|
|
||||||
cgit v0.11.0
|
|
@ -1,37 +0,0 @@
|
|||||||
From: Albert Astals Cid <albert.astals@canonical.com>
|
|
||||||
Date: Tue, 17 Feb 2015 08:53:27 +0000
|
|
||||||
Subject: Make sure there's a scene before using it
|
|
||||||
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=8fccfef424e7d2b7a2019b1f828234145d4011df
|
|
||||||
---
|
|
||||||
Make sure there's a scene before using it
|
|
||||||
|
|
||||||
Fixes crash hovering links in quassel
|
|
||||||
|
|
||||||
Task-number: QTBUG-44509
|
|
||||||
Change-Id: I77d8d9118ad185ed70a46e91445e2960200e562b
|
|
||||||
Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
|
|
||||||
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
|
|
||||||
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
--- a/src/widgets/kernel/qwidget.cpp
|
|
||||||
+++ b/src/widgets/kernel/qwidget.cpp
|
|
||||||
@@ -12272,7 +12272,7 @@
|
|
||||||
{
|
|
||||||
#ifndef QT_NO_GRAPHICSVIEW
|
|
||||||
Q_D(const QWidget);
|
|
||||||
- if (d->extra && d->extra->proxyWidget) {
|
|
||||||
+ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) {
|
|
||||||
const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views();
|
|
||||||
if (!views.isEmpty()) {
|
|
||||||
const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos);
|
|
||||||
@@ -12307,7 +12307,7 @@
|
|
||||||
{
|
|
||||||
#ifndef QT_NO_GRAPHICSVIEW
|
|
||||||
Q_D(const QWidget);
|
|
||||||
- if (d->extra && d->extra->proxyWidget) {
|
|
||||||
+ if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) {
|
|
||||||
const QList <QGraphicsView *> views = d->extra->proxyWidget->scene()->views();
|
|
||||||
if (!views.isEmpty()) {
|
|
||||||
const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos);
|
|
@ -1,82 +0,0 @@
|
|||||||
From: Dmitry Shachnev <mitya57@gmail.com>
|
|
||||||
Date: Sun, 11 Jan 2015 09:05:55 +0000
|
|
||||||
Subject: QSystemTrayIcon: handle submenus correctly
|
|
||||||
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=03dc2b2e82750d1c531cf00a406368cde4a8928b
|
|
||||||
---
|
|
||||||
QSystemTrayIcon: handle submenus correctly
|
|
||||||
|
|
||||||
This fixes a bug when submenus are shown as simple actions when
|
|
||||||
a platform system tray icon is used.
|
|
||||||
|
|
||||||
To correctly handle submenus, we need to set platform menus on
|
|
||||||
all submenus, and only then on a parent menu.
|
|
||||||
|
|
||||||
Change-Id: If2bfcc703b938dbb14ba4b9aa810039ced07e946
|
|
||||||
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
|
||||||
Reviewed-by: Dimitrios Glentadakis <dglent@free.fr>
|
|
||||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
--- a/src/widgets/util/qsystemtrayicon.cpp
|
|
||||||
+++ b/src/widgets/util/qsystemtrayicon.cpp
|
|
||||||
@@ -37,6 +37,7 @@
|
|
||||||
#ifndef QT_NO_SYSTEMTRAYICON
|
|
||||||
|
|
||||||
#include "qmenu.h"
|
|
||||||
+#include "qlist.h"
|
|
||||||
#include "qevent.h"
|
|
||||||
#include "qpoint.h"
|
|
||||||
#include "qlabel.h"
|
|
||||||
@@ -704,11 +705,7 @@
|
|
||||||
void QSystemTrayIconPrivate::updateMenu_sys_qpa()
|
|
||||||
{
|
|
||||||
if (menu) {
|
|
||||||
- if (!menu->platformMenu()) {
|
|
||||||
- QPlatformMenu *platformMenu = qpa_sys->createMenu();
|
|
||||||
- if (platformMenu)
|
|
||||||
- menu->setPlatformMenu(platformMenu);
|
|
||||||
- }
|
|
||||||
+ addPlatformMenu(menu);
|
|
||||||
qpa_sys->updateMenu(menu->platformMenu());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -741,6 +738,27 @@
|
|
||||||
static_cast<QPlatformSystemTrayIcon::MessageIcon>(icon), msecs);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void QSystemTrayIconPrivate::addPlatformMenu(QMenu *menu) const
|
|
||||||
+{
|
|
||||||
+ if (menu->platformMenu())
|
|
||||||
+ return; // The platform menu already exists.
|
|
||||||
+
|
|
||||||
+ // The recursion depth is the same as menu depth, so should not
|
|
||||||
+ // be higher than 3 levels.
|
|
||||||
+ QListIterator<QAction *> it(menu->actions());
|
|
||||||
+ while (it.hasNext()) {
|
|
||||||
+ QAction *action = it.next();
|
|
||||||
+ if (action->menu())
|
|
||||||
+ addPlatformMenu(action->menu());
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // This menu should be processed *after* its children, otherwise
|
|
||||||
+ // setMenu() is not called on respective QPlatformMenuItems.
|
|
||||||
+ QPlatformMenu *platformMenu = qpa_sys->createMenu();
|
|
||||||
+ if (platformMenu)
|
|
||||||
+ menu->setPlatformMenu(platformMenu);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
#endif // QT_NO_SYSTEMTRAYICON
|
|
||||||
|
|
||||||
--- a/src/widgets/util/qsystemtrayicon_p.h
|
|
||||||
+++ b/src/widgets/util/qsystemtrayicon_p.h
|
|
||||||
@@ -99,6 +99,7 @@
|
|
||||||
void updateMenu_sys_qpa();
|
|
||||||
QRect geometry_sys_qpa() const;
|
|
||||||
void showMessage_sys_qpa(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs);
|
|
||||||
+ void addPlatformMenu(QMenu *menu) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
class QBalloonTip : public QWidget
|
|
@ -1,132 +0,0 @@
|
|||||||
From b8902cfa8f14f72e879ed87f35645f6fbafebc0e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
Date: Tue, 5 May 2015 08:43:42 -0700
|
|
||||||
Subject: [PATCH 1/2] Require -fPIC instead of just -fPIE for
|
|
||||||
-reduce-relocations
|
|
||||||
|
|
||||||
GCC 5 combined with a recent binutils have a new optimization that
|
|
||||||
allows them to generate copy relocations even in -fPIE code. Clang has
|
|
||||||
the same functionality when compiling an executable with -flto. We need
|
|
||||||
to let the compilers know that they cannot use copy relocations, so they
|
|
||||||
need to use really position-independent code.
|
|
||||||
|
|
||||||
Position independent code throughout is not really required. We just
|
|
||||||
need the compilers to use position-independent access to symbols coming
|
|
||||||
from the Qt libraries, but there's currently no other way of doing that.
|
|
||||||
|
|
||||||
Task-number: QTBUG-45755
|
|
||||||
Change-Id: I0d4913955e3745b69672ffff13db5df7377398c5
|
|
||||||
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
||||||
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|
||||||
(cherry picked from commit 36d6eb721e7d5997ade75e289d4088dc48678d0d)
|
|
||||||
---
|
|
||||||
mkspecs/common/gcc-base.conf | 2 +-
|
|
||||||
mkspecs/common/qcc-base.conf | 2 +-
|
|
||||||
mkspecs/linux-icc/qmake.conf | 2 +-
|
|
||||||
src/corelib/Qt5CoreConfigExtras.cmake.in | 2 +-
|
|
||||||
src/corelib/global/qglobal.h | 4 ++--
|
|
||||||
tests/auto/tools/moc/tst_moc.cpp | 6 +++---
|
|
||||||
6 files changed, 9 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
|
|
||||||
index a149f4d9072fcaf50f32af7a047202bdf42db4f1..e4ccbd7156b5a37e5d17cc25bb1879d678ee0498 100644
|
|
||||||
--- a/mkspecs/common/gcc-base.conf
|
|
||||||
+++ b/mkspecs/common/gcc-base.conf
|
|
||||||
@@ -42,7 +42,7 @@ QMAKE_CFLAGS_RELEASE += $$QMAKE_CFLAGS_OPTIMIZE
|
|
||||||
QMAKE_CFLAGS_DEBUG += -g
|
|
||||||
QMAKE_CFLAGS_SHLIB += -fPIC
|
|
||||||
QMAKE_CFLAGS_STATIC_LIB += -fPIC
|
|
||||||
-QMAKE_CFLAGS_APP += -fPIE
|
|
||||||
+QMAKE_CFLAGS_APP += -fPIC
|
|
||||||
QMAKE_CFLAGS_ISYSTEM = -isystem
|
|
||||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
|
||||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
|
||||||
diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf
|
|
||||||
index f529d7fc7ba2c6a098db0e59e220e3f53d48d051..8276316c3fe3ba55f4055776e3ad3dbb3fd455e5 100644
|
|
||||||
--- a/mkspecs/common/qcc-base.conf
|
|
||||||
+++ b/mkspecs/common/qcc-base.conf
|
|
||||||
@@ -23,7 +23,7 @@ QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_OPTIMIZE -g
|
|
||||||
QMAKE_CFLAGS_DEBUG += -g
|
|
||||||
QMAKE_CFLAGS_SHLIB += -fPIC -shared
|
|
||||||
QMAKE_CFLAGS_STATIC_LIB += -fPIC
|
|
||||||
-QMAKE_CFLAGS_APP += -fPIE
|
|
||||||
+QMAKE_CFLAGS_APP += -fPIC
|
|
||||||
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
|
|
||||||
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden
|
|
||||||
QMAKE_CFLAGS_SSE2 += -msse2
|
|
||||||
diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf
|
|
||||||
index 8119c8aa09dc9b991942618b1f8954dc180978c6..9190aa9f28cf6b38455a718afd6851d341ca57b5 100644
|
|
||||||
--- a/mkspecs/linux-icc/qmake.conf
|
|
||||||
+++ b/mkspecs/linux-icc/qmake.conf
|
|
||||||
@@ -12,7 +12,7 @@ QMAKE_LEXFLAGS =
|
|
||||||
QMAKE_YACC = yacc
|
|
||||||
QMAKE_YACCFLAGS = -d
|
|
||||||
QMAKE_CFLAGS =
|
|
||||||
-QMAKE_CFLAGS_APP = -fPIE
|
|
||||||
+QMAKE_CFLAGS_APP = -fPIC
|
|
||||||
QMAKE_CFLAGS_DEPS = -M
|
|
||||||
QMAKE_CFLAGS_WARN_ON = -w1 -Wall -Wcheck -wd1572,873,2259,2261
|
|
||||||
QMAKE_CFLAGS_WARN_OFF = -w
|
|
||||||
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
index 9bda70ec07cc7fcbd43a07a9d4cca9cf774e22c6..ffe603fbe0892e056a00373ef092770511619733 100644
|
|
||||||
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
@@ -72,7 +72,7 @@ set(_qt5_corelib_extra_includes)
|
|
||||||
# macro to add it.
|
|
||||||
set(Qt5_POSITION_INDEPENDENT_CODE True)
|
|
||||||
set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
|
|
||||||
-set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\")
|
|
||||||
+set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIC\")
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
!!IF !isEmpty(QT_NAMESPACE)
|
|
||||||
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
|
|
||||||
index cb8bd15d8de01900484fc64646d6414471afd37f..746091386d67731eee8ade588cd705a34231c357 100644
|
|
||||||
--- a/src/corelib/global/qglobal.h
|
|
||||||
+++ b/src/corelib/global/qglobal.h
|
|
||||||
@@ -1046,9 +1046,9 @@ Q_CORE_EXPORT int qrand();
|
|
||||||
# define QT_NO_SHAREDMEMORY
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__) && !defined(__PIE__)
|
|
||||||
+#if !defined(QT_BOOTSTRAPPED) && defined(QT_REDUCE_RELOCATIONS) && defined(__ELF__) && !defined(__PIC__)
|
|
||||||
# error "You must build your code with position independent code if Qt was built with -reduce-relocations. "\
|
|
||||||
- "Compile your code with -fPIC or -fPIE."
|
|
||||||
+ "Compile your code with -fPIC."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace QtPrivate {
|
|
||||||
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
|
|
||||||
index edb6488eaa2f31731c6c260be790a8e6474fd838..748cb82989dadb983412c7316436de47db473419 100644
|
|
||||||
--- a/tests/auto/tools/moc/tst_moc.cpp
|
|
||||||
+++ b/tests/auto/tools/moc/tst_moc.cpp
|
|
||||||
@@ -662,7 +662,7 @@ void tst_Moc::oldStyleCasts()
|
|
||||||
|
|
||||||
QStringList args;
|
|
||||||
args << "-c" << "-x" << "c++" << "-Wold-style-cast" << "-I" << "."
|
|
||||||
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-";
|
|
||||||
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-";
|
|
||||||
proc.start("gcc", args);
|
|
||||||
QVERIFY(proc.waitForStarted());
|
|
||||||
proc.write(mocOut);
|
|
||||||
@@ -732,7 +732,7 @@ void tst_Moc::inputFileNameWithDotsButNoExtension()
|
|
||||||
|
|
||||||
QStringList args;
|
|
||||||
args << "-c" << "-x" << "c++" << "-I" << ".."
|
|
||||||
- << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIE" << "-";
|
|
||||||
+ << "-I" << qtIncludePath << "-o" << "/dev/null" << "-fPIC" << "-";
|
|
||||||
proc.start("gcc", args);
|
|
||||||
QVERIFY(proc.waitForStarted());
|
|
||||||
proc.write(mocOut);
|
|
||||||
@@ -1011,7 +1011,7 @@ void tst_Moc::ignoreOptionClashes()
|
|
||||||
// If -pthread wasn't ignored, it was parsed as a prefix of "thread/", which breaks compilation.
|
|
||||||
QStringList gccArgs;
|
|
||||||
gccArgs << "-c" << "-x" << "c++" << "-I" << ".."
|
|
||||||
- << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null" << "-fPIE" << "-";
|
|
||||||
+ << "-I" << qtIncludePath << "-I" << includeDir << "-o" << "/dev/null" << "-fPIC" << "-";
|
|
||||||
proc.start("gcc", gccArgs);
|
|
||||||
QVERIFY(proc.waitForStarted());
|
|
||||||
proc.write(mocOut);
|
|
||||||
--
|
|
||||||
2.4.1
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
From cee3096dc26c2f07985a3b2565c60a824aa53860 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
|
||||||
Date: Mon, 11 May 2015 12:20:57 +0300
|
|
||||||
Subject: [PATCH 2/2] Try to ensure that -fPIC is used in CMake builds
|
|
||||||
|
|
||||||
In commit 36d6eb721e7d5997ade75e289d4088dc48678d0d the -fPIE switch was
|
|
||||||
replaced with -fPIC in an effort to avoid generating copy relocations
|
|
||||||
which are incompatible with Qt5 when built with -reduce-relocations.
|
|
||||||
|
|
||||||
Task-number: QTBUG-45755
|
|
||||||
Change-Id: I59a55ea15052f498104848c5fd867e563ddc2290
|
|
||||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
(cherry picked from commit 083c9269ed73e8771e1dbe10812696b45b7389f3)
|
|
||||||
---
|
|
||||||
src/corelib/Qt5CoreConfigExtras.cmake.in | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
index ffe603fbe0892e056a00373ef092770511619733..785d5252b76fc7d66bc3fb903a614b161bfef34c 100644
|
|
||||||
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
|
|
||||||
@@ -71,8 +71,9 @@ set(_qt5_corelib_extra_includes)
|
|
||||||
# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module
|
|
||||||
# macro to add it.
|
|
||||||
set(Qt5_POSITION_INDEPENDENT_CODE True)
|
|
||||||
-set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
|
|
||||||
set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIC\")
|
|
||||||
+set_property(TARGET Qt5::Core PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE \"ON\")
|
|
||||||
+set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS ${Qt5Core_EXECUTABLE_COMPILE_FLAGS})
|
|
||||||
!!ENDIF
|
|
||||||
|
|
||||||
!!IF !isEmpty(QT_NAMESPACE)
|
|
||||||
--
|
|
||||||
2.4.1
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
|||||||
From: Alexander Volkov <a.volkov@rusbitech.ru>
|
|
||||||
Date: Mon, 09 Feb 2015 14:19:14 +0000
|
|
||||||
Subject: xcb: Update mouse buttons from MotionNotify events
|
|
||||||
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=76de1ac0a4cd384f608a14b5d77a8cf3ef1ec868
|
|
||||||
---
|
|
||||||
xcb: Update mouse buttons from MotionNotify events
|
|
||||||
|
|
||||||
We don't receive ButtonRelease event after closing a popup
|
|
||||||
by clicking outside of the client area. Thus the internal
|
|
||||||
state of mouse buttons in the xcb plugin becomes outdated
|
|
||||||
until we receive ButtonRelease event.
|
|
||||||
|
|
||||||
This commit updates the internal state of mouse buttons
|
|
||||||
from MotionNotify events. So when a user will move a mouse
|
|
||||||
on the client area, the xcb plugin will send a mouse event
|
|
||||||
with updated buttons to Qt Gui and QGuiApplication will
|
|
||||||
detect the following mouse events correctly.
|
|
||||||
|
|
||||||
Task-number: QTBUG-32609
|
|
||||||
Task-number: QTBUG-35065
|
|
||||||
Task-number: QTBUG-43776
|
|
||||||
Task-number: QTBUG-44166
|
|
||||||
Task-number: QTBUG-44231
|
|
||||||
Change-Id: Ica334dfbf04f7ef81db86b25262328fe5da11808
|
|
||||||
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
|
|
||||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
|
|
||||||
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
|
||||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
|
||||||
@@ -818,6 +818,15 @@
|
|
||||||
qCDebug(lcQpaXInput, "xcb: released mouse button %d, button state %X", event->detail, static_cast<unsigned int>(m_buttons));
|
|
||||||
}
|
|
||||||
|
|
||||||
+void QXcbConnection::handleMotionNotify(xcb_generic_event_t *ev)
|
|
||||||
+{
|
|
||||||
+ xcb_motion_notify_event_t *event = (xcb_motion_notify_event_t *)ev;
|
|
||||||
+
|
|
||||||
+ m_buttons = (m_buttons & ~0x7) | translateMouseButtons(event->state);
|
|
||||||
+ if (Q_UNLIKELY(lcQpaXInput().isDebugEnabled()))
|
|
||||||
+ qDebug("xcb: moved mouse to %4d, %4d; button state %X", event->event_x, event->event_y, static_cast<unsigned int>(m_buttons));
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#ifndef QT_NO_XKB
|
|
||||||
namespace {
|
|
||||||
typedef union {
|
|
||||||
@@ -868,11 +877,8 @@
|
|
||||||
handleButtonRelease(event);
|
|
||||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_button_release_event_t, event, handleButtonReleaseEvent);
|
|
||||||
case XCB_MOTION_NOTIFY:
|
|
||||||
- if (Q_UNLIKELY(lcQpaXInput().isDebugEnabled())) {
|
|
||||||
- xcb_motion_notify_event_t *mev = (xcb_motion_notify_event_t *)event;
|
|
||||||
- qDebug("xcb: moved mouse to %4d, %4d; button state %X", mev->event_x, mev->event_y, static_cast<unsigned int>(m_buttons));
|
|
||||||
- }
|
|
||||||
m_keyboard->updateXKBStateFromCore(((xcb_motion_notify_event_t *)event)->state);
|
|
||||||
+ handleMotionNotify(event);
|
|
||||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_motion_notify_event_t, event, handleMotionNotifyEvent);
|
|
||||||
case XCB_CONFIGURE_NOTIFY:
|
|
||||||
HANDLE_PLATFORM_WINDOW_EVENT(xcb_configure_notify_event_t, event, handleConfigureNotifyEvent);
|
|
||||||
|
|
||||||
--- a/src/plugins/platforms/xcb/qxcbconnection.h
|
|
||||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
|
|
||||||
@@ -496,6 +496,7 @@
|
|
||||||
void updateScreens();
|
|
||||||
void handleButtonPress(xcb_generic_event_t *event);
|
|
||||||
void handleButtonRelease(xcb_generic_event_t *event);
|
|
||||||
+ void handleMotionNotify(xcb_generic_event_t *event);
|
|
||||||
|
|
||||||
bool m_xi2Enabled;
|
|
||||||
int m_xi2Minor;
|
|
@ -1,40 +0,0 @@
|
|||||||
From: Richard J. Moore <rich@kde.org>
|
|
||||||
Date: Sat, 21 Feb 2015 17:43:21 +0000
|
|
||||||
Subject: Fix a division by zero when processing malformed BMP files.
|
|
||||||
---
|
|
||||||
Fix a division by zero when processing malformed BMP files.
|
|
||||||
|
|
||||||
This fixes a division by 0 when processing a maliciously crafted BMP
|
|
||||||
file. No impact beyond DoS.
|
|
||||||
|
|
||||||
Task-number: QTBUG-44547
|
|
||||||
Change-Id: Ifcded2c0aa712e90d23e6b3969af0ec3add53973
|
|
||||||
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
||||||
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
--- a/src/gui/image/qbmphandler.cpp
|
|
||||||
+++ b/src/gui/image/qbmphandler.cpp
|
|
||||||
@@ -314,12 +314,20 @@
|
|
||||||
}
|
|
||||||
} else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) {
|
|
||||||
red_shift = calc_shift(red_mask);
|
|
||||||
+ if (((red_mask >> red_shift) + 1) == 0)
|
|
||||||
+ return false;
|
|
||||||
red_scale = 256 / ((red_mask >> red_shift) + 1);
|
|
||||||
green_shift = calc_shift(green_mask);
|
|
||||||
+ if (((green_mask >> green_shift) + 1) == 0)
|
|
||||||
+ return false;
|
|
||||||
green_scale = 256 / ((green_mask >> green_shift) + 1);
|
|
||||||
blue_shift = calc_shift(blue_mask);
|
|
||||||
+ if (((blue_mask >> blue_shift) + 1) == 0)
|
|
||||||
+ return false;
|
|
||||||
blue_scale = 256 / ((blue_mask >> blue_shift) + 1);
|
|
||||||
alpha_shift = calc_shift(alpha_mask);
|
|
||||||
+ if (((alpha_mask >> alpha_shift) + 1) == 0)
|
|
||||||
+ return false;
|
|
||||||
alpha_scale = 256 / ((alpha_mask >> alpha_shift) + 1);
|
|
||||||
} else if (comp == BMP_RGB && (nbits == 24 || nbits == 32)) {
|
|
||||||
blue_mask = 0x000000ff;
|
|
||||||
|
|
@ -1,3 +1,48 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 3 22:55:30 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
- Update to 5.4.2
|
||||||
|
* Important Behavior Changes:
|
||||||
|
- EXIF orientation is no longer applied to JPEG images on read.
|
||||||
|
EXIF orientation on JPEG was introduced in 5.4.0, but due to
|
||||||
|
a bug the most common EXIF-format (big-endian) was not working
|
||||||
|
until 5.4.1. 5.4.2 restores the behavior of 5.4.0 and earlier
|
||||||
|
for most EXIF-tagged JPEGs.
|
||||||
|
EXIF orientation will be an opt-in starting with Qt 5.5.
|
||||||
|
- On x86 and x86-64 systems with ELF binaries (especially Linux),
|
||||||
|
due to a new optimization in GCC 5.x in combination with a recent
|
||||||
|
version of GNU binutils, compiling Qt applications with -fPIE
|
||||||
|
is no longer enough with GCC 5.x. Applications now need to be
|
||||||
|
compiled with the -fPIC option if Qt's option "reduce relocations"
|
||||||
|
is active. For backward compatibility only, Qt accepts the use
|
||||||
|
of -fPIE for GCC 4.x versions.
|
||||||
|
Note that Clang is known to generate incompatible code even
|
||||||
|
with -fPIC if the -flto option is active.
|
||||||
|
Applications using qmake or cmake >= 2.8.12 as their build
|
||||||
|
system will adapt automatically. Applications using an older
|
||||||
|
release of cmake in combination with GCC 5.x need to change
|
||||||
|
their CMakeLists.txt to add Qt5Core_EXECUTABLE_COMPILE_FLAGS
|
||||||
|
to CMAKE_CXX_FLAGS. In particular, applications using
|
||||||
|
cmake >= 2.8.9 and < 2.8.11 will continue to build with the
|
||||||
|
-fPIE option and invoke the special compatibility mode
|
||||||
|
if using GCC 4.x.
|
||||||
|
* Bugfix release, for more details please see:
|
||||||
|
http://blog.qt.io/blog/2015/06/02/qt-5-4-2-released/
|
||||||
|
- Drop patches merged upstream:
|
||||||
|
Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
|
||||||
|
Fix-Meta-shortcuts-on-XCB.patch
|
||||||
|
Fix-upload-corruptions-when-server-closes-connection.patch
|
||||||
|
Fixed-a-deadlock-when-the-lock-file-is-corrupted.patch
|
||||||
|
Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
|
||||||
|
Make-qglobal.h-complain-if-you-use-fPIE.patch
|
||||||
|
Make-sure-theres-a-scene-before-using-it.patch
|
||||||
|
QSystemTrayIcon-handle-submenus-correctly.patch
|
||||||
|
Require-fPIC-instead-of-just-fPIE-for-reduce-relocations.patch
|
||||||
|
Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch
|
||||||
|
Update-mouse-buttons-from-MotionNotify-events.patch
|
||||||
|
fix-a-division-by-zero-when-processing-malformed-BMP-files.patch
|
||||||
|
- Added cmake (Build)Requires to get autoprovides for all Qt modules
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 18 13:34:07 UTC 2015 - hrvoje.senjan@gmail.com
|
Mon May 18 13:34:07 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libqt5-qtbase
|
# spec file for package libqt5-qtbase
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -26,15 +26,15 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: libqt5-qtbase
|
Name: libqt5-qtbase
|
||||||
Version: 5.4.1
|
Version: 5.4.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: C++ Program Library, Core Components
|
Summary: C++ Program Library, Core Components
|
||||||
License: GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1
|
License: GPL-3.0 or SUSE-LGPL-2.1-with-digia-exception-1.1
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Url: http://qt.digia.com
|
Url: http://qt.digia.com
|
||||||
%define base_name libqt5
|
%define base_name libqt5
|
||||||
%define real_version 5.4.1
|
%define real_version 5.4.2
|
||||||
%define so_version 5.4.1
|
%define so_version 5.4.2
|
||||||
%define tar_version qtbase-opensource-src-%{real_version}
|
%define tar_version qtbase-opensource-src-%{real_version}
|
||||||
Source: %{tar_version}.tar.xz
|
Source: %{tar_version}.tar.xz
|
||||||
# to get mtime of file:
|
# to get mtime of file:
|
||||||
@ -59,36 +59,12 @@ Patch7: make-qdbusxml2cpp-output-reproducible.patch
|
|||||||
Patch8: Fix-shortcuts-with-keypad-keys.patch
|
Patch8: Fix-shortcuts-with-keypad-keys.patch
|
||||||
# patches 1000-2000 and above from upstream 5.3 branch #
|
# patches 1000-2000 and above from upstream 5.3 branch #
|
||||||
# patches 2000-3000 and above from upstream 5.4 branch #
|
# patches 2000-3000 and above from upstream 5.4 branch #
|
||||||
# PATCH-FIX-UPSTREAM QSystemTrayIcon-handle-submenus-correctly.patch
|
|
||||||
Patch2000: QSystemTrayIcon-handle-submenus-correctly.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Fix-Meta-shortcuts-on-XCB.patch
|
|
||||||
Patch2001: Fix-Meta-shortcuts-on-XCB.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Update-mouse-buttons-from-MotionNotify-events.patch
|
|
||||||
Patch2002: Update-mouse-buttons-from-MotionNotify-events.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Make-sure-theres-a-scene-before-using-it.patch
|
|
||||||
Patch2003: Make-sure-theres-a-scene-before-using-it.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
|
|
||||||
Patch2004: Handle-SelectionWindowDestroy-in-QXcbClipboard.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
|
|
||||||
Patch2005: Call-ofono-nm-Registered-delayed-in-constructor-othe.patch
|
|
||||||
# PATCH-FIX-UPSTREAM fix-a-division-by-zero-when-processing-malformed-BMP-files.patch
|
|
||||||
Patch2006: fix-a-division-by-zero-when-processing-malformed-BMP-files.patch
|
|
||||||
# PATCH-FIX-UPSTREAM 0001-Speed-up-compose-file-parsing-in-the-X11-composition.patch
|
# PATCH-FIX-UPSTREAM 0001-Speed-up-compose-file-parsing-in-the-X11-composition.patch
|
||||||
Patch2007: 0001-Speed-up-compose-file-parsing-in-the-X11-composition.patch
|
Patch2007: 0001-Speed-up-compose-file-parsing-in-the-X11-composition.patch
|
||||||
# PATCH-FIX-UPSTREAM 0002-Speed-up-application-startup-on-X11.patch
|
# PATCH-FIX-UPSTREAM 0002-Speed-up-application-startup-on-X11.patch
|
||||||
Patch2008: 0002-Speed-up-application-startup-on-X11.patch
|
Patch2008: 0002-Speed-up-application-startup-on-X11.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix-regression-in-compose-table-parsing.patch
|
# PATCH-FIX-UPSTREAM Fix-regression-in-compose-table-parsing.patch
|
||||||
Patch2009: Fix-regression-in-compose-table-parsing.patch
|
Patch2009: Fix-regression-in-compose-table-parsing.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix-upload-corruptions-when-server-closes-connection.patch
|
|
||||||
Patch2010: Fix-upload-corruptions-when-server-closes-connection.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Fixed-a-deadlock-when-the-lock-file-is-corrupted.patch
|
|
||||||
Patch2011: Fixed-a-deadlock-when-the-lock-file-is-corrupted.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Require-fPIC-instead-of-just-fPIE-for-reduce-relocations.patch
|
|
||||||
Patch2012: Require-fPIC-instead-of-just-fPIE-for-reduce-relocations.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Make-qglobal.h-complain-if-you-use-fPIE.patch
|
|
||||||
Patch2013: Make-qglobal.h-complain-if-you-use-fPIE.patch
|
|
||||||
# PATCH-FIX-UPSTREAM Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch
|
|
||||||
Patch2014: Try-to-ensure-that-fPIC-is-used-in-CMake-builds.patch
|
|
||||||
BuildRequires: alsa-devel
|
BuildRequires: alsa-devel
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -143,6 +119,8 @@ BuildRequires: xkeyboard-config
|
|||||||
%if %journald
|
%if %journald
|
||||||
BuildRequires: pkgconfig(libsystemd-journal)
|
BuildRequires: pkgconfig(libsystemd-journal)
|
||||||
%endif
|
%endif
|
||||||
|
# to get cmake(...) autoprovides
|
||||||
|
BuildRequires: cmake
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -174,21 +152,9 @@ handling.
|
|||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch7 -p0
|
%patch7 -p0
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch2000 -p1
|
|
||||||
%patch2001 -p1
|
|
||||||
%patch2002 -p1
|
|
||||||
%patch2003 -p1
|
|
||||||
%patch2004 -p1
|
|
||||||
%patch2005 -p1
|
|
||||||
%patch2006 -p1
|
|
||||||
%patch2007 -p1
|
%patch2007 -p1
|
||||||
%patch2008 -p1
|
%patch2008 -p1
|
||||||
%patch2009 -p1
|
%patch2009 -p1
|
||||||
%patch2010 -p1
|
|
||||||
%patch2011 -p1
|
|
||||||
%patch2012 -p1
|
|
||||||
%patch2013 -p1
|
|
||||||
%patch2014 -p1
|
|
||||||
|
|
||||||
# be sure not to use them
|
# be sure not to use them
|
||||||
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
|
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
|
||||||
@ -224,6 +190,8 @@ Summary: Qt 5 Core Development Binaries
|
|||||||
Group: Development/Libraries/X11
|
Group: Development/Libraries/X11
|
||||||
Requires: gcc-c++
|
Requires: gcc-c++
|
||||||
Requires: pkg-config
|
Requires: pkg-config
|
||||||
|
# to get cmake(...) autoprovides
|
||||||
|
Requires: cmake
|
||||||
|
|
||||||
%description common-devel
|
%description common-devel
|
||||||
Qt 5 Core Development Binaries. It contains Qt5's moc, qmake,
|
Qt 5 Core Development Binaries. It contains Qt5's moc, qmake,
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8574a593830959c0f7e5430fe77a43832ea7f5299e14a397a74576b3df7fb1b7
|
|
||||||
size 46132220
|
|
3
qtbase-opensource-src-5.4.2.tar.xz
Normal file
3
qtbase-opensource-src-5.4.2.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9fc4f720b8b5a8b8e4a7d45e13ce4d5b86756ad46fb406386637eb2de5fd5a74
|
||||||
|
size 46354192
|
Loading…
Reference in New Issue
Block a user