diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-31 15:47:53 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-31 15:47:53 +0000 |
commit | d950fa39dbe16d164ed0cb8e3036fd5d0d896a4c (patch) | |
tree | 04f92d5d1070a7aedb970ce4539dc6d60253c4df /dev-qt/qtcore | |
parent | bd7908c6630f38067350d396ac5d18c3cc2434a0 (diff) |
gentoo resync : 31.10.2017
Diffstat (limited to 'dev-qt/qtcore')
-rw-r--r-- | dev-qt/qtcore/Manifest | 7 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch | 431 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-4.8.6-r2.ebuild | 86 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-4.8.7-r2.ebuild | 2 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.6.2-r1.ebuild | 42 |
5 files changed, 2 insertions, 566 deletions
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest index 4e206cdd19e8..6dce6f905b7d 100644 --- a/dev-qt/qtcore/Manifest +++ b/dev-qt/qtcore/Manifest @@ -1,6 +1,5 @@ AUX qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch 3410 SHA256 9dbb9be4dfefc00711058b99fe2425bb43c811a1b36a6f046336e13c666d40ea SHA512 6770959ba01756d6a3fa9e03edd5f6c1df0d8625f4add65f7fef55a93b7b52c555a0ce749984938fb7ab905c2e0875cec0cb5d07f45c1b447fbc9e2d0ec678bb WHIRLPOOL d06e33e4d6545b99d930212f6ad767a6c59cb241cb0b28fe3401853700c26c9fd9a5dc0eb5cfaef62ed8f7874eccf906c7c39c469c6725e9db3836c8982422d8 AUX qtcore-4.8.5-qeventdispatcher-recursive.patch 4017 SHA256 5db36cbb0686b8a503941779c821febc4a0330dc260e51d603f7aa1e4d8860ad SHA512 bd63961bcb695beebe8686142b84bff7702db4d85d737f5c2da927252b931700d03602f80048223cbbb05d85a5ddb9cb818321d756577f84843690b318f0c413 WHIRLPOOL f981bf3c3d1a62b486788433cabb2880b7f361ccdf99e502fb595608195168d72ba14018c93273f2726c60bae61a44cba3244026009823e832109a1f7418e773 -AUX qtcore-4.8.6-QNAM-corruptions-fix.patch 17586 SHA256 5309c0f1ed0fc54799537b6d0a51b9682f52b4b40cc76e6fa71afc7273120e40 SHA512 4367974513b230d0395d0d0ebff5007255c257126309b614c37e8297981b833b397792fe9dede1960e0027a87d3fbc5eb252253a7ed73f4f9383531ea39cc874 WHIRLPOOL 8eded4f95d00f2ce572cf1956745d5a06e07f54a6ed6e67578914c0d2c9be63994cbf9177212d25c3c2678bf7328b2364b5977ebb8e8d7b8e4ad79009be6a7ae AUX qtcore-4.8.6-moc-boost-1.60.patch 884 SHA256 cf7417eb14641c0e4f65148f67cab2af74ef2f20cb245ef9e21b8a0b2d8f0c0d SHA512 f7375b444291cd0abf5324aa9150e3eb49e110713826e2aa03d8a149d6727c1ff2fe6f6b2e159f3a9e41c628a6d5f3e6ea161050722f58ca0e9ad269a27c052d WHIRLPOOL 7d86baf0ceeb2259fc319d7908f47d2c64f98e490e9bda3930137db5808c9cd0fb2877ac3731bfaaba7ed19a8c014904054b08545642588650b58504ec52e378 AUX qtcore-4.8.7-libressl.patch 2161 SHA256 c01d0225d593a87d5764993be9a53b0adbf9493487ad7c5583ef3abcb35b1c4d SHA512 c84b827fd5f0c504c9ab95352677dc2cfe926c81aa012b454d8260385215b510835ba693830b3a3a6fa374b299995ec14cbb07711f41031788fc6c3bec396021 WHIRLPOOL 26274cc870721bcbb364a3e41aa95af0d7d5561b0882ca4bf058c036a063fe3fa77072f09a0d84ffb1f0a6dab2201d03c8602a2d5f7815752cfdb9180e2689a1 AUX qtcore-4.8.7-moc.patch 926 SHA256 032978c364ed669842fc06f03f28b08ad8fd5a19afe49bd6e6f2b5b5ae262ebb SHA512 cb64e3e2271d3031c11d2c8afe1bcfd5263bcf8b8c787d03059b4bca25f3dd2d8a092c80cb396a1a466d2ef667697c31856c7c675aa7c48b5680f5e91db95f86 WHIRLPOOL 588f6fdaa43f8d65ece7ae2ec1e20d7f797d4dce6cdd67bd05d2c27d7facf28c598c7e191a118e1433cb1d1e5c7596073f552568d6683c69d07db9e9e79ebaf0 @@ -8,15 +7,11 @@ AUX qtcore-5.6.2-plugins.patch 3264 SHA256 2e0e863830f457d597e608815e92c25e4e092 AUX qtcore-5.7.1-qipm.patch 5915 SHA256 a5fb3bee98d797ac5e34bec02bcc1b5b0834fa1092fa6d1e1ea3d490975ae42f SHA512 807c030c2059cddcd159cb537ba2e4be68d6f612f45e1e7b844fc045f661739aea7bc35743735cee364d692d51774e17edced1aac8d444abaa4e4435117a5b3d WHIRLPOOL e13e1a24b750fe7729b1d86214491358937344b7a39c6c2941d372f5ce9077ecc1c320a0be2e5a9c772e1b01d786e55176cdad252c317bc62215c9c7acfe0d6b AUX qtcore-5.7.1-qsfpm-1.patch 8922 SHA256 3376b4564d793e0bf3770a8ebcc474a03e7aa49a8a578c136bbcb1fa6e9e136a SHA512 3854fffa1181cebe4683c54d5e774301a8710bf784dcc18367d04d193a7ce76fc6f634096b6986af41c3f5e4432b702873181a8900fd18e7617ea472d23d6d92 WHIRLPOOL 0ae27f2596e8601a4717bf76d06a2c452f4a0f087355766e7ca9483c8959ddd2c0765a6154ee1dde612347fb69ddc28581121c64cfa6f97a3067b1112bdb86c3 AUX qtcore-5.7.1-qsfpm-2.patch 7812 SHA256 a2bb1a42df644906cacb084e579166e8229c774e2f678b8b523215d4bbffe1e7 SHA512 38b141aa7d30011d71ed9044c69f79b56698320600a64ed3cc37e8dd9d22bb9ec2f33f8348d074552a5046c2855e948e325d5421384cb4c66c0bbd566500174d WHIRLPOOL 3e65f1413ce3b3800d694b731d74026ac5d5f08f9af20b257c2b7424ec954cb1fa28067496b028c3e66680ae88e59d8ccf8c080b049fa05f31162705db1a0898 -DIST qt-everywhere-opensource-src-4.8.6.tar.gz 241623667 SHA256 8b14dd91b52862e09b8e6a963507b74bc2580787d171feda197badfa7034032c SHA512 c2d07c3cf9d687cb9b93e337c89df3f0055bd02bc8aa5ecd55d3ffb238b31a4308aeabc3c51a4f94ac76a1b00796f047513d02e427ed93ae8dd99f836fff7692 WHIRLPOOL 473566814a77237dbdd37a47980c1085f6cf39599c4d6b0120959fe80dadf65c4eaafd5f528dd86cea8815562faa204bedfe3b766c2ca4f2d2c99efc21dbca84 DIST qt-everywhere-opensource-src-4.8.7.tar.gz 241075567 SHA256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 SHA512 f9f81a2e7205e1fd05c8d923dc73244f29aa33f951fa6b7c5c8193449328b37084796b9b71ad0c317e4e6fd00017c10ea5d67b1b2032551cde00548522218125 WHIRLPOOL ad8f01172f5bdb3a3a69fe7b03862c4c411bc8d95211053ad66ed1d60a3c0577d073d1075a1e0a80b25d9b2721addda55a2967e6ccf5e194cec8d08770ac5fc2 -DIST qtbase-opensource-src-5.6.2.tar.xz 46825164 SHA256 2f6eae93c5d982fe0a387a01aeb3435571433e23e9d9d9246741faf51f1ee787 SHA512 ff55204e6f0b046ccb03430ac6a22bd743bc2f3822625f0c23a481a8a7acb5d93f5b8e900815c70f10554887fbe26b3ee79f6d702acfa5c370e4e3cbd1f2b321 WHIRLPOOL 4a68aae4e471b0cfac3abf3652bb18cac8ffce17c941c8589a154bf07eb8d26945fab535f2e1acb866a584584c1811e953aa19fb1b3709831d85a620f0b6dc5a DIST qtbase-opensource-src-5.7.1.tar.xz 44992616 SHA256 edcdf549d94d98aff08e201dcb3ca25bc3628a37b1309e320d5f556b6b66557e SHA512 0506a3a856f76e5ba182e3382a515282b6096f3900fbdc14cd5aec425105ab61922e0ada0361234387335ceb80b3c69e39cd34d75476c2946c4371e7b8c0827f WHIRLPOOL de5ff1380b3fd9cbcca741d212ac516e3f8a31366219605730cf5525a04e4efc9965a9b3cf8e99f50a2912bc7add83f61e7f90a85e176ad2830e4c1422b5d682 DIST qtbase-opensource-src-5.9.2.tar.xz 45148744 SHA256 7fe2bb468955f633c71b3ddd3c269e68a2c4137a4e5b8dd12dcdb34cbc6d609b SHA512 a2f965871645256f3d019f71f3febb875455a29d03fccc7a3371ddfeb193b0af12394e779df05adf69fd10fe7b0d966f3915a24528ec7eb3bc36c2db6af2b6e7 WHIRLPOOL aed0b8aac590fad17b4f9067b46097e81d9991307b296428a9592d66a7c11967ee3e9a50b1d05afdeb7503470e658b016ec5af5c71e71059bd4c0d391b845f95 -EBUILD qtcore-4.8.6-r2.ebuild 2744 SHA256 968b23f5c563cd96ff65a62da9632e40dc64d1b6f44a8918109ff3be1fac2ff3 SHA512 d5ef3b214ea1c8569d56383b6c0400435f3244a5e22792cbdfaba5147c7b746f96b83dd8fb035c01e8dfe09474f414f516e8f80e8aea489184d9bf01d02f4949 WHIRLPOOL c96e51c2e79ee21b4c286a08ae21364b1a03cdc4b8efad290b8d7160a1f57f0d8ffe5760dcb2693c6ac55fdb8d70f452f42b8602e2d26c20614aac1e2247260c -EBUILD qtcore-4.8.7-r2.ebuild 2864 SHA256 7461eb354f481eb54958681f620ffb3280ee77e032c7b458f942f44693092a47 SHA512 9d17ecbdc61d4a32313b57939b2791852a0e041bcf21ca3a2d1b1e64c2111d63085c161a50ecdf94cb2dafe3a724f2ef9e259a0f85e85ff43cd12d26a8527d51 WHIRLPOOL c2e11e085b11cd47da1e7925c3337f27b4ad5174e4333ad06cc7b7877fe18eb63953c8422b3b2f11600a0e2dbc7e813902afc4fb10beb364a73818c079e491bb +EBUILD qtcore-4.8.7-r2.ebuild 2865 SHA256 2af381f8700d70c589255e8144512a2c248fb9736a968a7b722bb1a0365d8b02 SHA512 2ff2b7002e29a154fa4f8977484f5af595dc96a38c6b4cf034b637e1237ce40d270ceaa3b220172d119a0ce61f4b10cda9bb3beb477bf376668bc88c56c0e463 WHIRLPOOL f4468c5ff7793048b4901edd6893701d364c36b40e35c367d052989762778721251e0f62e56d88544f1e2d8f2bc3d489999bf9ae83c988e2e83bd576b782fb77 EBUILD qtcore-4.8.7-r3.ebuild 2870 SHA256 0a7a3e4ce75813f2ffb5e27f4e0d94bb66eb9d9e0403cc1ab59ddad974dc6cc9 SHA512 b667ef5eaeb44dbb5d5b97017e5f5bfcd9d1a0b3ba821f0b2bb146430030cb8cfbfaeaa519cb5f4af9d35ce9125086da0010e94bc987769aeed1e5bd3ecd16c4 WHIRLPOOL a07628361e7ebf8e8f64eea07e3f960b1650abfe6c635ab5d1c8d4623fd2d9ba4e293519b878ab955eba2bfa0d1b5416a0a56b4260ef89fd28b65dd7f9d5e405 -EBUILD qtcore-5.6.2-r1.ebuild 783 SHA256 15cb9ff991a709c55bbd21215937034b519c8ff22bbdb05052ce8db3f914cb30 SHA512 3f3ff0c9abb107de70d9b4e2b0319652e58f5aeac2a91554fa92edcd71137e295075c456bfdaa5901c6ddfc18fbdd7a94412e27fc537f042d78d83426b72eecd WHIRLPOOL 476519404c4485b589442af4e12c7288f4f65a5e7b8e635fd3e7456744970691955a5851fe0cb96e5900c837e1e39deb85e10402a4bd643a6646866daac6815d EBUILD qtcore-5.7.1-r3.ebuild 896 SHA256 5e5147a1845598ad8ca5dd3adc0a48e0f75c2a83ba4ed55f4ea688005babf53d SHA512 bd5fd8e6a9a189773f4c5473d0073709f034b661a28296a8f4d3cac4d26eaf63f04e4b0d08028810b77ca10bfe8c67aaf6c4cf2da7a436e2b29f9b04024cb158 WHIRLPOOL 142ea4799f6d8d9795f2f63b3acf7c38bb6c2b879e03589df1cc4ee5f1adb8146054a66f92cef22adfeaf7ed72f213cab4fdea5f98f58c3661476a95599c13f2 EBUILD qtcore-5.9.2.ebuild 1389 SHA256 2a348b867a9f2698d76dfbc29fe88f869a7376498c4a329d76da7891ec4a7b03 SHA512 b51328052f28e8cb5f48ae59834553fb995099245a0e6b3390fa0006b89620a889c45b36baf5f028ef1111b87597380c940c6df0a69a14aac07ca6824d795fc0 WHIRLPOOL 62325390101aeeb78c53da2113be3b461558f062fabfbc676d480927bcd98941f36ff69b98de52fd0a3586cfc802e1c6c35a13f5ffe1f7ffb3aad6f9ac01c34c MISC ChangeLog 9693 SHA256 f4aca4d960a27efc5b05da84e8bb5e12114d1298585c1781667b9609448ef945 SHA512 95ffb29b0a99815353e2ed5fb9d4588b563aa0c291daad187b48c4d1875836bf107dd95bc0b373754c33ca6208491b89066038969f63a736551122721d823a1c WHIRLPOOL c4a321c22421fe056e69a33a157cb5f74c1be70efb0d3eaa560076e945653fc7bae4468a8867892ee9e3ce7ce4697730881dec9a3be2b45f4fd866b0c3b19f6e diff --git a/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch deleted file mode 100644 index 1d83caa3a260..000000000000 --- a/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch +++ /dev/null @@ -1,431 +0,0 @@ -From fa81aa6d027049e855b76f5408586a288f160575 Mon Sep 17 00:00:00 2001 -From: Markus Goetz <markus@woboq.com> -Date: Tue, 28 Apr 2015 11:57:36 +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 - -(cherry picked from commit qtbase/cff39fba10ffc10ee4dcfdc66ff6528eb26462d3) -Change-Id: I9793297be6cf3edfb75b65ba03b65f7a133ef194 -Reviewed-by: Richard J. Moore <rich@kde.org> ---- - src/corelib/io/qnoncontiguousbytedevice.cpp | 19 +++ - src/corelib/io/qnoncontiguousbytedevice_p.h | 4 + - .../access/qhttpnetworkconnectionchannel.cpp | 47 +++++- - src/network/access/qhttpthreaddelegate_p.h | 36 ++++- - src/network/access/qnetworkaccesshttpbackend.cpp | 24 ++- - src/network/access/qnetworkaccesshttpbackend_p.h | 5 +- - tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 174 ++++++++++++++++++++- - 7 files changed, 280 insertions(+), 29 deletions(-) - -diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp -index bf58eee..1a0591e 100644 ---- a/src/corelib/io/qnoncontiguousbytedevice.cpp -+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp -@@ -245,6 +245,12 @@ qint64 QNonContiguousByteDeviceByteArrayImpl::size() - return byteArray->size(); - } - -+qint64 QNonContiguousByteDeviceByteArrayImpl::pos() -+{ -+ return currentPosition; -+} -+ -+ - QNonContiguousByteDeviceRingBufferImpl::QNonContiguousByteDeviceRingBufferImpl(QSharedPointer<QRingBuffer> rb) - : QNonContiguousByteDevice(), currentPosition(0) - { -@@ -296,6 +302,11 @@ qint64 QNonContiguousByteDeviceRingBufferImpl::size() - return ringBuffer->size(); - } - -+qint64 QNonContiguousByteDeviceRingBufferImpl::pos() -+{ -+ return currentPosition; -+} -+ - QNonContiguousByteDeviceIoDeviceImpl::QNonContiguousByteDeviceIoDeviceImpl(QIODevice *d) - : QNonContiguousByteDevice(), - currentReadBuffer(0), currentReadBufferSize(16*1024), -@@ -415,6 +426,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 b6966eb..d1a99a1 100644 ---- a/src/corelib/io/qnoncontiguousbytedevice_p.h -+++ b/src/corelib/io/qnoncontiguousbytedevice_p.h -@@ -69,6 +69,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; } -@@ -108,6 +109,7 @@ public: - bool atEnd(); - bool reset(); - qint64 size(); -+ qint64 pos(); - protected: - QByteArray* byteArray; - qint64 currentPosition; -@@ -123,6 +125,7 @@ public: - bool atEnd(); - bool reset(); - qint64 size(); -+ qint64 pos(); - protected: - QSharedPointer<QRingBuffer> ringBuffer; - qint64 currentPosition; -@@ -140,6 +143,7 @@ public: - bool atEnd(); - bool reset(); - qint64 size(); -+ qint64 pos(); - protected: - QIODevice* device; - QByteArray* currentReadBuffer; -diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp -index 550e090..db2f712 100644 ---- a/src/network/access/qhttpnetworkconnectionchannel.cpp -+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp -@@ -107,15 +107,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(). -@@ -144,13 +148,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); - } - #endif - } -@@ -163,7 +167,8 @@ void QHttpNetworkConnectionChannel::close() - else - state = QHttpNetworkConnectionChannel::ClosingState; - -- socket->close(); -+ if (socket) -+ socket->close(); - } - - -@@ -280,6 +285,14 @@ bool QHttpNetworkConnectionChannel::sendRequest() - // nothing to read currently, break the loop - break; - } else { -+ if (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" << written << "but read device is at" << uploadByteDevice->pos(); -+ Q_ASSERT(written == uploadByteDevice->pos()); -+ connection->d_func()->emitReplyError(socket, reply, QNetworkReply::ProtocolFailure); -+ return false; -+ } -+ - qint64 currentWriteSize = socket->write(readPointer, currentReadSize); - if (currentWriteSize == -1 || currentWriteSize != currentReadSize) { - // socket broke down -@@ -639,6 +652,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; - } - -@@ -980,6 +1001,13 @@ void QHttpNetworkConnectionChannel::_q_readyRead() - 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(); -@@ -1029,7 +1057,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 (!pendingEncrypt && !ssl) { // FIXME: Didn't work properly with pendingEncrypt only, we should refactor this into an EncrypingState - state = QHttpNetworkConnectionChannel::IdleState; - if (!reply) - connection->d_func()->dequeueRequest(socket); -@@ -1157,7 +1185,10 @@ void QHttpNetworkConnectionChannel::_q_proxyAuthenticationRequired(const QNetwor - - void QHttpNetworkConnectionChannel::_q_uploadDataReadyRead() - { -- sendRequest(); -+ if (reply && state == QHttpNetworkConnectionChannel::WritingState) { -+ // There might be timing issues, make sure to only send upload data if really in that state -+ sendRequest(); -+ } - } - - #ifndef QT_NO_OPENSSL -diff --git a/src/network/access/qhttpthreaddelegate_p.h b/src/network/access/qhttpthreaddelegate_p.h -index 7648325..9dd0deb 100644 ---- a/src/network/access/qhttpthreaddelegate_p.h -+++ b/src/network/access/qhttpthreaddelegate_p.h -@@ -190,6 +190,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(), -@@ -197,7 +198,8 @@ public: - m_amount(0), - m_data(0), - m_atEnd(aE), -- m_size(s) -+ m_size(s), -+ m_pos(0) - { - } - -@@ -205,6 +207,11 @@ public: - { - } - -+ qint64 pos() -+ { -+ return m_pos; -+ } -+ - const char* readPointer(qint64 maximumLength, qint64 &len) - { - if (m_amount > 0) { -@@ -232,11 +239,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; - } -@@ -253,10 +259,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; - } - -@@ -267,8 +284,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; -@@ -288,7 +310,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/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp -index cc67258..fe2f627 100644 ---- a/src/network/access/qnetworkaccesshttpbackend.cpp -+++ b/src/network/access/qnetworkaccesshttpbackend.cpp -@@ -193,6 +193,7 @@ QNetworkAccessHttpBackendFactory::create(QNetworkAccessManager::Operation op, - QNetworkAccessHttpBackend::QNetworkAccessHttpBackend() - : QNetworkAccessBackend() - , statusCode(0) -+ , uploadByteDevicePosition(false) - , pendingDownloadDataEmissions(new QAtomicInt()) - , pendingDownloadProgressEmissions(new QAtomicInt()) - , loadingFromCache(false) -@@ -610,9 +611,9 @@ void QNetworkAccessHttpBackend::postRequest() - forwardUploadDevice->setParent(delegate); // needed to make sure it is moved on moveToThread() - delegate->httpRequest.setUploadByteDevice(forwardUploadDevice); - -- // From main thread to user thread: -- QObject::connect(this, SIGNAL(haveUploadData(QByteArray, bool, qint64)), -- forwardUploadDevice, SLOT(haveDataSlot(QByteArray, bool, qint64)), Qt::QueuedConnection); -+ // From user thread to http thread: -+ QObject::connect(this, 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); -@@ -620,8 +621,8 @@ void QNetworkAccessHttpBackend::postRequest() - // From http thread to user thread: - QObject::connect(forwardUploadDevice, SIGNAL(wantData(qint64)), - this, SLOT(wantUploadDataSlot(qint64))); -- QObject::connect(forwardUploadDevice, SIGNAL(processedData(qint64)), -- this, SLOT(sentUploadDataSlot(qint64))); -+ QObject::connect(forwardUploadDevice,SIGNAL(processedData(qint64, qint64)), -+ this, SLOT(sentUploadDataSlot(qint64,qint64))); - connect(forwardUploadDevice, SIGNAL(resetData(bool*)), - this, SLOT(resetUploadDataSlot(bool*)), - Qt::BlockingQueuedConnection); // this is the only one with BlockingQueued! -@@ -915,12 +916,21 @@ void QNetworkAccessHttpBackend::replySslConfigurationChanged(const QSslConfigura - void QNetworkAccessHttpBackend::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 QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 amount) -+void QNetworkAccessHttpBackend::sentUploadDataSlot(qint64 pos, qint64 amount) - { -+ if (uploadByteDevicePosition + amount != pos) { -+ // Sanity check, should not happen. -+ error(QNetworkReply::UnknownNetworkError, ""); -+ } - uploadByteDevice->advanceReadPointer(amount); -+ uploadByteDevicePosition += amount; - } - - // Coming from QNonContiguousByteDeviceThreadForwardImpl in HTTP thread -@@ -933,7 +943,7 @@ void QNetworkAccessHttpBackend::wantUploadDataSlot(qint64 maxSize) - QByteArray dataArray(data, currentUploadDataLength); - - // Communicate back to HTTP thread -- emit haveUploadData(dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size()); -+ emit haveUploadData(uploadByteDevicePosition, dataArray, uploadByteDevice->atEnd(), uploadByteDevice->size()); - } - - /* -diff --git a/src/network/access/qnetworkaccesshttpbackend_p.h b/src/network/access/qnetworkaccesshttpbackend_p.h -index 13519c6..b4ed67c 100644 ---- a/src/network/access/qnetworkaccesshttpbackend_p.h -+++ b/src/network/access/qnetworkaccesshttpbackend_p.h -@@ -112,7 +112,7 @@ signals: - - void startHttpRequestSynchronously(); - -- void haveUploadData(QByteArray dataArray, bool dataAtEnd, qint64 dataSize); -+ void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize); - private slots: - // From HTTP thread: - void replyDownloadData(QByteArray); -@@ -129,13 +129,14 @@ private slots: - // From QNonContiguousByteDeviceThreadForwardImpl in HTTP thread: - void resetUploadDataSlot(bool *r); - void wantUploadDataSlot(qint64); -- void sentUploadDataSlot(qint64); -+ void sentUploadDataSlot(qint64, qint64); - - bool sendCacheContents(const QNetworkCacheMetaData &metaData); - - private: - QHttpNetworkRequest httpRequest; // There is also a copy in the HTTP thread - int statusCode; -+ qint64 uploadByteDevicePosition; - QString reasonPhrase; - // Will be increased by HTTP thread: - QSharedPointer<QAtomicInt> pendingDownloadDataEmissions; - diff --git a/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild deleted file mode 100644 index c9a3c5e433bf..000000000000 --- a/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit qt4-build-multilib - -DESCRIPTION="Cross-platform application development framework" -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="+glib iconv icu qt3support ssl" - -DEPEND=" - >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] - glib? ( dev-libs/glib:2[${MULTILIB_USEDEP}] ) - iconv? ( >=virtual/libiconv-0-r2[${MULTILIB_USEDEP}] ) - icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] ) - ssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) -" -RDEPEND="${DEPEND}" -PDEPEND=" - ~dev-qt/qttranslations-${PV} - qt3support? ( ~dev-qt/qtgui-${PV}[aqua=,debug=,glib=,qt3support,${MULTILIB_USEDEP}] ) -" - -MULTILIB_WRAPPED_HEADERS=( - /usr/include/qt4/Qt/qconfig.h - /usr/include/qt4/QtCore/qconfig.h -) - -PATCHES=( - "${FILESDIR}/${PN}-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch" # bug 514968 - "${FILESDIR}/${PN}-4.8.5-qeventdispatcher-recursive.patch" # bug 514968 - "${FILESDIR}/${PN}-4.8.6-QNAM-corruptions-fix.patch" # bug 548622 - "${FILESDIR}/${PN}-4.8.6-moc-boost-1.60.patch" # bug 556104 -) - -QT4_TARGET_DIRECTORIES=" - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/tools/uic - src/corelib - src/network - src/xml - src/plugins/codecs/cn - src/plugins/codecs/jp - src/plugins/codecs/kr - src/plugins/codecs/tw - tools/linguist/lconvert - tools/linguist/lrelease - tools/linguist/lupdate" - -QCONFIG_DEFINE="QT_ZLIB" - -src_prepare() { - qt4-build-multilib_src_prepare - - # bug 172219 - sed -i -e "s:CXXFLAGS.*=:CXXFLAGS=${CXXFLAGS} :" \ - -e "s:LFLAGS.*=:LFLAGS=${LDFLAGS} :" \ - qmake/Makefile.unix || die "sed qmake/Makefile.unix failed" - - # bug 427782 - sed -i -e '/^CPPFLAGS\s*=/ s/-g //' \ - qmake/Makefile.unix || die "sed CPPFLAGS in qmake/Makefile.unix failed" - sed -i -e 's/setBootstrapVariable QMAKE_CFLAGS_RELEASE/QMakeVar set QMAKE_CFLAGS_RELEASE/' \ - -e 's/setBootstrapVariable QMAKE_CXXFLAGS_RELEASE/QMakeVar set QMAKE_CXXFLAGS_RELEASE/' \ - configure || die "sed configure setBootstrapVariable failed" -} - -multilib_src_configure() { - local myconf=( - -no-accessibility -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon - -no-phonon-backend -no-svg -no-webkit -no-script -no-scripttools -no-declarative - -system-zlib -no-gif -no-libtiff -no-libpng -no-libmng -no-libjpeg - -no-cups -no-dbus -no-gtkstyle -no-nas-sound -no-opengl -no-openvg - -no-sm -no-xshape -no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes - -no-xrandr -no-xrender -no-mitshm -no-fontconfig -no-freetype -no-xinput -no-xkb - $(qt_use glib) - $(qt_use iconv) - $(qt_use icu) - $(use ssl && echo -openssl-linked || echo -no-openssl) - $(qt_use qt3support) - ) - qt4_multilib_src_configure -} diff --git a/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild index 19f8832d3108..f5fbbe0bce72 100644 --- a/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild +++ b/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild @@ -7,7 +7,7 @@ inherit qt4-build-multilib DESCRIPTION="Cross-platform application development framework" if [[ ${QT4_BUILD_TYPE} == release ]]; then - KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" + KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" fi IUSE="+glib iconv icu libressl qt3support ssl" diff --git a/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild b/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild deleted file mode 100644 index 8993a7d4bbf7..000000000000 --- a/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -QT5_MODULE="qtbase" -inherit qt5-build - -DESCRIPTION="Cross-platform application development framework" - -if [[ ${QT5_BUILD_TYPE} == release ]]; then - KEYWORDS="amd64 arm ~arm64 hppa ppc ppc64 x86" -fi - -IUSE="icu systemd" - -DEPEND=" - dev-libs/glib:2 - >=dev-libs/libpcre-8.38[pcre16,unicode] - >=sys-libs/zlib-1.2.5 - virtual/libiconv - icu? ( dev-libs/icu:= ) - systemd? ( sys-apps/systemd:= ) -" -RDEPEND="${DEPEND}" - -PATCHES=( "${FILESDIR}/${P}-plugins.patch" ) - -QT5_TARGET_SUBDIRS=( - src/tools/bootstrap - src/tools/moc - src/tools/rcc - src/corelib - src/tools/qlalr -) - -src_configure() { - local myconf=( - $(qt_use icu) - $(qt_use systemd journald) - ) - qt5-build_src_configure -} |