diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-qt/qtcore |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-qt/qtcore')
-rw-r--r-- | dev-qt/qtcore/Manifest | 22 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch | 81 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch | 94 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch | 431 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch | 16 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch | 52 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch | 81 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch | 152 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-1.patch | 252 | ||||
-rw-r--r-- | dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-2.patch | 195 | ||||
-rw-r--r-- | dev-qt/qtcore/metadata.xml | 25 | ||||
-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 | 92 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.6.2-r1.ebuild | 42 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.7.1-r3.ebuild | 48 | ||||
-rw-r--r-- | dev-qt/qtcore/qtcore-5.9.2.ebuild | 66 |
16 files changed, 1735 insertions, 0 deletions
diff --git a/dev-qt/qtcore/Manifest b/dev-qt/qtcore/Manifest new file mode 100644 index 000000000000..e5cd4e1c0476 --- /dev/null +++ b/dev-qt/qtcore/Manifest @@ -0,0 +1,22 @@ +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-5.6.2-plugins.patch 3264 SHA256 2e0e863830f457d597e608815e92c25e4e0924a7c13c80649547e8a9be6bb420 SHA512 0d50ba6cd94fc29158931e2e09ec21c48780ecfaa75443efd842cce05cc3030f81a02385714b42d5cede3b0cbf8efc24d3c660ac4438cdd428a24bf8a624bb2d WHIRLPOOL 9ea062360162c636f43d7b490a3ee3931496b05001f9f0c99d588494d344f0a7a9d0e989b5695e468ec754e7bc789b2c2961db221701d8adf984efd691ee2a92 +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-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 +MISC ChangeLog-2015 39675 SHA256 e20442daca27ffcf2af416d96c297e97d2fa134c9f44f6367ee9a382053a98ae SHA512 8e7f5e0641cb28af92e41b6d12a9fb2b122a6d9d9b50de53cad3044e57cf856af6e801881e5ba4649b0e45de2446274d7d0d91c4db6f5e9577f05275dc743184 WHIRLPOOL 6863180f16ad0b8da781561940366ab9558e8ad7c12d6ab10b194e1ac959d8ed30171fb21b5a35c87e5f7f06e231d7e848b4a5dabeb6a3902602a62c86c5f34f +MISC metadata.xml 924 SHA256 7369ebbc573d8559ca650bd6a9a48f84f7a1537371cf6b70ff5c8db61143fbf9 SHA512 c9786a997109a6156ed4879cd94e3e368b7ce095fc43fced168bdc5fbc846411c145318020d0eab7024aa64003403435a6cad222ab3569d838b9450c526c8ddb WHIRLPOOL 8bdbd40a2656f0b2442956a026636a0c5f3a3efb0d6f1628b23d5a3eb541f4bfa4546b1fafa77f173cc1871138fba8e52d67943edce19be10f47e686ac4c16b0 diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch new file mode 100644 index 000000000000..0fcc1fa6561d --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.5-honor-ExcludeSocketNotifiers-in-glib-event-loop.patch @@ -0,0 +1,81 @@ +From 267feb2de49eed0823ca0c29f1cd5238537c7116 Mon Sep 17 00:00:00 2001 +From: Jan-Marek Glogowski <glogow@fbihome.de> +Date: Thu, 6 Mar 2014 18:44:43 +0100 +Subject: Honor ExcludeSocketNotifiers in glib event loop + +Implements QEventLoop::ExcludeSocketNotifiers in the same way +QEventLoop::X11ExcludeTimers is already implemented for the glib +event loop. + +This prevents crashes when QClipboard checks for clipboard events +and + qApp->clipboard()->setProperty( "useEventLoopWhenWaiting", true ); +is set. + +Task-number: QTBUG-34614 +Task-number: QTBUG-37380 + +Change-Id: Id4e2a74c6bdf8c3b439a4e3813d24d11368b607d +--- + src/corelib/kernel/qeventdispatcher_glib.cpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp +index 0b0e308..ba522fa 100644 +--- a/src/corelib/kernel/qeventdispatcher_glib.cpp ++++ b/src/corelib/kernel/qeventdispatcher_glib.cpp +@@ -65,6 +65,7 @@ struct GPollFDWithQSocketNotifier + struct GSocketNotifierSource + { + GSource source; ++ QEventLoop::ProcessEventsFlags processEventsFlags; + QList<GPollFDWithQSocketNotifier *> pollfds; + }; + +@@ -80,6 +81,9 @@ static gboolean socketNotifierSourceCheck(GSource *source) + GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); + + bool pending = false; ++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) ++ return pending; ++ + for (int i = 0; !pending && i < src->pollfds.count(); ++i) { + GPollFDWithQSocketNotifier *p = src->pollfds.at(i); + +@@ -103,6 +107,9 @@ static gboolean socketNotifierSourceDispatch(GSource *source, GSourceFunc, gpoin + QEvent event(QEvent::SockAct); + + GSocketNotifierSource *src = reinterpret_cast<GSocketNotifierSource *>(source); ++ if (src->processEventsFlags & QEventLoop::ExcludeSocketNotifiers) ++ return true; ++ + for (int i = 0; i < src->pollfds.count(); ++i) { + GPollFDWithQSocketNotifier *p = src->pollfds.at(i); + +@@ -331,6 +338,7 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context) + reinterpret_cast<GSocketNotifierSource *>(g_source_new(&socketNotifierSourceFuncs, + sizeof(GSocketNotifierSource))); + (void) new (&socketNotifierSource->pollfds) QList<GPollFDWithQSocketNotifier *>(); ++ socketNotifierSource->processEventsFlags = QEventLoop::AllEvents; + g_source_set_can_recurse(&socketNotifierSource->source, true); + g_source_attach(&socketNotifierSource->source, mainContext); + +@@ -416,6 +424,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) + // tell postEventSourcePrepare() and timerSource about any new flags + QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; + d->timerSource->processEventsFlags = flags; ++ d->socketNotifierSource->processEventsFlags = flags; + + if (!(flags & QEventLoop::EventLoopExec)) { + // force timers to be sent at normal priority +@@ -427,6 +436,7 @@ bool QEventDispatcherGlib::processEvents(QEventLoop::ProcessEventsFlags flags) + result = g_main_context_iteration(d->mainContext, canWait); + + d->timerSource->processEventsFlags = savedFlags; ++ d->socketNotifierSource->processEventsFlags = savedFlags; + + if (canWait) + emit awake(); +-- +2.0.0 + diff --git a/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch new file mode 100644 index 000000000000..6d3bf2f2cde2 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.5-qeventdispatcher-recursive.patch @@ -0,0 +1,94 @@ +--- src/corelib/kernel/qeventdispatcher_glib.cpp.sav 2014-03-28 15:26:37.000000000 +0100 ++++ src/corelib/kernel/qeventdispatcher_glib.cpp 2014-04-24 09:44:09.358659204 +0200 +@@ -255,22 +255,30 @@ struct GPostEventSource + GSource source; + QAtomicInt serialNumber; + int lastSerialNumber; ++ QEventLoop::ProcessEventsFlags processEventsFlags; + QEventDispatcherGlibPrivate *d; + }; + + static gboolean postEventSourcePrepare(GSource *s, gint *timeout) + { ++ GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); + QThreadData *data = QThreadData::current(); + if (!data) + return false; + ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((source->processEventsFlags & excludeAllFlags) == excludeAllFlags) ++ return false; ++ + gint dummy; + if (!timeout) + timeout = &dummy; + const bool canWait = data->canWaitLocked(); + *timeout = canWait ? -1 : 0; + +- GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); + return (!canWait + || (source->serialNumber != source->lastSerialNumber)); + } +@@ -284,8 +292,14 @@ static gboolean postEventSourceDispatch( + { + GPostEventSource *source = reinterpret_cast<GPostEventSource *>(s); + source->lastSerialNumber = source->serialNumber; +- QCoreApplication::sendPostedEvents(); +- source->d->runTimersOnceWithNormalPriority(); ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((source->processEventsFlags & excludeAllFlags) != excludeAllFlags) { ++ QCoreApplication::sendPostedEvents(); ++ source->d->runTimersOnceWithNormalPriority(); ++ } + return true; // i dunno, george... + } + +@@ -329,6 +343,7 @@ QEventDispatcherGlibPrivate::QEventDispa + postEventSource = reinterpret_cast<GPostEventSource *>(g_source_new(&postEventSourceFuncs, + sizeof(GPostEventSource))); + postEventSource->serialNumber = 1; ++ postEventSource->processEventsFlags = QEventLoop::AllEvents; + postEventSource->d = this; + g_source_set_can_recurse(&postEventSource->source, true); + g_source_attach(&postEventSource->source, mainContext); +@@ -423,6 +438,7 @@ bool QEventDispatcherGlib::processEvents + + // tell postEventSourcePrepare() and timerSource about any new flags + QEventLoop::ProcessEventsFlags savedFlags = d->timerSource->processEventsFlags; ++ d->postEventSource->processEventsFlags = flags; + d->timerSource->processEventsFlags = flags; + d->socketNotifierSource->processEventsFlags = flags; + +@@ -435,6 +451,7 @@ bool QEventDispatcherGlib::processEvents + while (!result && canWait) + result = g_main_context_iteration(d->mainContext, canWait); + ++ d->postEventSource->processEventsFlags = savedFlags; + d->timerSource->processEventsFlags = savedFlags; + d->socketNotifierSource->processEventsFlags = savedFlags; + +--- src/corelib/kernel/qeventdispatcher_unix.cpp.sav 2013-06-07 07:16:52.000000000 +0200 ++++ src/corelib/kernel/qeventdispatcher_unix.cpp 2014-04-24 09:43:06.927589535 +0200 +@@ -905,7 +905,15 @@ bool QEventDispatcherUNIX::processEvents + + // we are awake, broadcast it + emit awake(); +- QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); ++ ++ QEventLoop::ProcessEventsFlags excludeAllFlags ++ = QEventLoop::ExcludeUserInputEvents ++ | QEventLoop::ExcludeSocketNotifiers ++ | QEventLoop::X11ExcludeTimers; ++ if ((flags & excludeAllFlags) == excludeAllFlags) ++ return false; ++ if(( flags & excludeAllFlags ) != excludeAllFlags ) ++ QCoreApplicationPrivate::sendPostedEvents(0, 0, d->threadData); + + int nevents = 0; + const bool canWait = (d->threadData->canWaitLocked() 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 new file mode 100644 index 000000000000..1d83caa3a260 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.6-QNAM-corruptions-fix.patch @@ -0,0 +1,431 @@ +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/files/qtcore-4.8.6-moc-boost-1.60.patch b/dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch new file mode 100644 index 000000000000..91a5526ad833 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.6-moc-boost-1.60.patch @@ -0,0 +1,16 @@ +diff -up qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp +--- qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp.QTBUG-22829 2015-05-07 09:14:44.000000000 -0500 ++++ qt-everywhere-opensource-src-4.8.7/src/tools/moc/main.cpp 2016-03-16 13:20:43.145899869 -0500 +@@ -188,8 +188,11 @@ int runMoc(int _argc, char **_argv) + pp.macros["Q_MOC_RUN"]; + pp.macros["__cplusplus"]; + +- // Workaround a bug while parsing the boost/type_traits/has_operator.hpp header. See QTBUG-22829 ++ // Workaround a bug while parsing some boost headers. See QTBUG-22829 + pp.macros["BOOST_TT_HAS_OPERATOR_HPP_INCLUDED"]; ++ pp.macros["BOOST_LEXICAL_CAST_INCLUDED"]; ++ pp.macros["BOOST_NEXT_PRIOR_HPP_INCLUDED"]; ++ pp.macros["BOOST_TYPE_TRAITS_HPP"]; + + QByteArray filename; + QByteArray output; diff --git a/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch b/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch new file mode 100644 index 000000000000..b838c7a687b6 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-4.8.7-libressl.patch @@ -0,0 +1,52 @@ +--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2015-11-25 01:38:42.103898399 -0500 ++++ src/network/ssl/qsslsocket_openssl_symbols.cpp 2015-11-25 01:40:50.146247648 -0500 +@@ -224,13 +224,17 @@ + #ifndef OPENSSL_NO_SSL2 + DEFINEFUNC(const SSL_METHOD *, SSLv2_client_method, DUMMYARG, DUMMYARG, return 0, return) + #endif ++#ifndef OPENSSL_NO_SSL3 + DEFINEFUNC(const SSL_METHOD *, SSLv3_client_method, DUMMYARG, DUMMYARG, return 0, return) ++#endif + DEFINEFUNC(const SSL_METHOD *, SSLv23_client_method, DUMMYARG, DUMMYARG, return 0, return) + DEFINEFUNC(const SSL_METHOD *, TLSv1_client_method, DUMMYARG, DUMMYARG, return 0, return) + #ifndef OPENSSL_NO_SSL2 + DEFINEFUNC(const SSL_METHOD *, SSLv2_server_method, DUMMYARG, DUMMYARG, return 0, return) + #endif ++#ifndef OPENSSL_NO_SSL3 + DEFINEFUNC(const SSL_METHOD *, SSLv3_server_method, DUMMYARG, DUMMYARG, return 0, return) ++#endif + DEFINEFUNC(const SSL_METHOD *, SSLv23_server_method, DUMMYARG, DUMMYARG, return 0, return) + DEFINEFUNC(const SSL_METHOD *, TLSv1_server_method, DUMMYARG, DUMMYARG, return 0, return) + #else +@@ -818,13 +822,17 @@ + #ifndef OPENSSL_NO_SSL2 + RESOLVEFUNC(SSLv2_client_method) + #endif ++#ifndef OPENSSL_NO_SSL3 + RESOLVEFUNC(SSLv3_client_method) ++#endif + RESOLVEFUNC(SSLv23_client_method) + RESOLVEFUNC(TLSv1_client_method) + #ifndef OPENSSL_NO_SSL2 + RESOLVEFUNC(SSLv2_server_method) + #endif ++#ifndef OPENSSL_NO_SSL3 + RESOLVEFUNC(SSLv3_server_method) ++#endif + RESOLVEFUNC(SSLv23_server_method) + RESOLVEFUNC(TLSv1_server_method) + RESOLVEFUNC(X509_NAME_entry_count) +--- src/network/ssl/qsslsocket_openssl.cpp.orig 2015-11-25 01:44:55.235087906 -0500 ++++ src/network/ssl/qsslsocket_openssl.cpp 2015-11-25 01:45:45.194443818 -0500 +@@ -263,7 +263,11 @@ + #endif + break; + case QSsl::SslV3: ++#ifndef OPENSSL_NO_SSL3 + ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method()); ++#else ++ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error ++#endif + break; + case QSsl::SecureProtocols: // SslV2 will be disabled below + case QSsl::TlsV1SslV3: // SslV2 will be disabled below diff --git a/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch new file mode 100644 index 000000000000..d969869c0855 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.6.2-plugins.patch @@ -0,0 +1,81 @@ +From ca4d93d85ee446c5e30ec8e7814651e45cbf1218 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira <thiago.macieira@intel.com> +Date: Thu, 12 Nov 2015 10:14:51 -0800 +Subject: Stop unloading plugins in QPluginLoader and QFactoryLoader + +QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we +missed the equivalent code in QFactoryLoader (which bypasses +QPluginLoader). Besides, QPluginLoader::unload() was still doing +unloading, which it won't anymore. + +Not unloading plugins is Qt's policy, as decided during the 5.0 +development process and reaffirmed now in 5.6. This is due to static +data in plugins leaking out and remaining in use past the unloading of +the plugin, causing crashes. + +This does not affect QLibrary and QLibrary::unload(). Those are meant +for non-Qt loadable modules, so unloading them may be safe. + +Task-number: QTBUG-49061 +Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html +Change-Id: I461e9fc7199748faa187ffff1416070f138df8db +(cherry picked from commit 494376f980e96339b6f1eff7c41336ca4d853065) +Discussed-again-on: http://lists.qt-project.org/pipermail/development/2016-October/027476.html +Reviewed-by: Lars Knoll <lars.knoll@qt.io> +--- + src/corelib/plugin/qfactoryloader.cpp | 6 ++++-- + src/corelib/plugin/qpluginloader.cpp | 5 +++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp +index dcf1b1a..b6558f5 100644 +--- a/src/corelib/plugin/qfactoryloader.cpp ++++ b/src/corelib/plugin/qfactoryloader.cpp +@@ -208,10 +208,12 @@ void QFactoryLoader::update() + ++keyUsageCount; + } + } +- if (keyUsageCount || keys.isEmpty()) ++ if (keyUsageCount || keys.isEmpty()) { ++ library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload + d->libraryList += library; +- else ++ } else { + library->release(); ++ } + } + } + #else +diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp +index 37f2368..0ea8280 100644 +--- a/src/corelib/plugin/qpluginloader.cpp ++++ b/src/corelib/plugin/qpluginloader.cpp +@@ -148,6 +148,7 @@ QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent) + : QObject(parent), d(0), did_load(false) + { + setFileName(fileName); ++ setLoadHints(QLibrary::PreventUnloadHint); + } + + /*! +@@ -342,7 +343,7 @@ static QString locatePlugin(const QString& fileName) + void QPluginLoader::setFileName(const QString &fileName) + { + #if defined(QT_SHARED) +- QLibrary::LoadHints lh; ++ QLibrary::LoadHints lh = QLibrary::PreventUnloadHint; + if (d) { + lh = d->loadHints(); + d->release(); +@@ -391,7 +392,7 @@ Q_GLOBAL_STATIC(StaticPluginList, staticPluginList) + \brief Give the load() function some hints on how it should behave. + + You can give hints on how the symbols in the plugin are +- resolved. By default, none of the hints are set. ++ resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set. + + See the documentation of QLibrary::loadHints for a complete + description of how this property works. +-- +cgit v1.0-4-g1e03 + diff --git a/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch b/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch new file mode 100644 index 000000000000..abea14588075 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.7.1-qipm.patch @@ -0,0 +1,152 @@ +From baad82d242a4d8c1af6c87faaa7f25584183fd53 Mon Sep 17 00:00:00 2001 +From: Stephen Kelly <steveire@gmail.com> +Date: Tue, 20 Dec 2016 00:44:12 +0000 +Subject: [PATCH] QIPM: Persist model indexes after emitting layoutChange, not + before + +Callers can persist a QModelIndex which was not persisted before in a +slot connected to the signal, and such a persisted index must be updated +in the course of the layoutChange. + +Store the indexes to persist after emitting the signal. + +Task-number: QTBUG-32981 +Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e +Reviewed-by: David Faure <david.faure@kdab.com> +--- + src/corelib/itemmodels/qidentityproxymodel.cpp | 18 ++--- + .../tst_qidentityproxymodel.cpp | 76 ++++++++++++++++++++++ + 2 files changed, 85 insertions(+), 9 deletions(-) + +diff --git a/src/corelib/itemmodels/qidentityproxymodel.cpp b/src/corelib/itemmodels/qidentityproxymodel.cpp +index e537793..7c30679 100644 +--- a/src/corelib/itemmodels/qidentityproxymodel.cpp ++++ b/src/corelib/itemmodels/qidentityproxymodel.cpp +@@ -496,15 +496,6 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPe + { + Q_Q(QIdentityProxyModel); + +- const auto proxyPersistentIndexes = q->persistentIndexList(); +- for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) { +- proxyIndexes << proxyPersistentIndex; +- Q_ASSERT(proxyPersistentIndex.isValid()); +- const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); +- Q_ASSERT(srcPersistentIndex.isValid()); +- layoutChangePersistentIndexes << srcPersistentIndex; +- } +- + QList<QPersistentModelIndex> parents; + parents.reserve(sourceParents.size()); + for (const QPersistentModelIndex &parent : sourceParents) { +@@ -518,6 +509,15 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPe + } + + q->layoutAboutToBeChanged(parents, hint); ++ ++ const auto proxyPersistentIndexes = q->persistentIndexList(); ++ for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) { ++ proxyIndexes << proxyPersistentIndex; ++ Q_ASSERT(proxyPersistentIndex.isValid()); ++ const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); ++ Q_ASSERT(srcPersistentIndex.isValid()); ++ layoutChangePersistentIndexes << srcPersistentIndex; ++ } + } + + void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) +diff --git a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +index e946f31..564b854 100644 +--- a/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp ++++ b/tests/auto/corelib/itemmodels/qidentityproxymodel/tst_qidentityproxymodel.cpp +@@ -68,6 +68,8 @@ private slots: + + void itemData(); + ++ void persistIndexOnLayoutChange(); ++ + protected: + void verifyIdentity(QAbstractItemModel *model, const QModelIndex &parent = QModelIndex()); + +@@ -377,5 +379,79 @@ void tst_QIdentityProxyModel::itemData() + QCOMPARE(proxy.itemData(topIndex).value(Qt::DisplayRole).toString(), QStringLiteral("Monday_appended")); + } + ++void dump(QAbstractItemModel* model, QString const& indent = " - ", QModelIndex const& parent = {}) ++{ ++ for (auto row = 0; row < model->rowCount(parent); ++row) ++ { ++ auto idx = model->index(row, 0, parent); ++ qDebug() << (indent + idx.data().toString()); ++ dump(model, indent + "- ", idx); ++ } ++} ++ ++void tst_QIdentityProxyModel::persistIndexOnLayoutChange() ++{ ++ DynamicTreeModel model; ++ ++ QList<int> ancestors; ++ for (auto i = 0; i < 3; ++i) ++ { ++ Q_UNUSED(i); ++ ModelInsertCommand insertCommand(&model); ++ insertCommand.setAncestorRowNumbers(ancestors); ++ insertCommand.setStartRow(0); ++ insertCommand.setEndRow(0); ++ insertCommand.doCommand(); ++ ancestors.push_back(0); ++ } ++ ModelInsertCommand insertCommand(&model); ++ insertCommand.setAncestorRowNumbers(ancestors); ++ insertCommand.setStartRow(0); ++ insertCommand.setEndRow(1); ++ insertCommand.doCommand(); ++ ++ // dump(&model); ++ // " - 1" ++ // " - - 2" ++ // " - - - 3" ++ // " - - - - 4" ++ // " - - - - 5" ++ ++ QIdentityProxyModel proxy; ++ proxy.setSourceModel(&model); ++ ++ QPersistentModelIndex persistentIndex; ++ ++ QPersistentModelIndex sourcePersistentIndex = model.match(model.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first(); ++ ++ QCOMPARE(sourcePersistentIndex.data().toString(), QStringLiteral("5")); ++ ++ bool gotLayoutAboutToBeChanged = false; ++ bool gotLayoutChanged = false; ++ ++ QObject::connect(&proxy, &QAbstractItemModel::layoutAboutToBeChanged, &proxy, [&proxy, &persistentIndex, &gotLayoutAboutToBeChanged] ++ { ++ gotLayoutAboutToBeChanged = true; ++ persistentIndex = proxy.match(proxy.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first(); ++ }); ++ ++ QObject::connect(&proxy, &QAbstractItemModel::layoutChanged, &proxy, [&proxy, &persistentIndex, &sourcePersistentIndex, &gotLayoutChanged] ++ { ++ gotLayoutChanged = true; ++ QCOMPARE(QModelIndex(persistentIndex), proxy.mapFromSource(sourcePersistentIndex)); ++ }); ++ ++ ModelChangeChildrenLayoutsCommand layoutChangeCommand(&model, 0); ++ ++ layoutChangeCommand.setAncestorRowNumbers(QList<int>{0, 0, 0}); ++ layoutChangeCommand.setSecondAncestorRowNumbers(QList<int>{0, 0}); ++ ++ layoutChangeCommand.doCommand(); ++ ++ QVERIFY(gotLayoutAboutToBeChanged); ++ QVERIFY(gotLayoutChanged); ++ QVERIFY(persistentIndex.isValid()); ++} ++ + QTEST_MAIN(tst_QIdentityProxyModel) + #include "tst_qidentityproxymodel.moc" +-- +2.7.4 + diff --git a/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-1.patch b/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-1.patch new file mode 100644 index 000000000000..9edbe18617a2 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-1.patch @@ -0,0 +1,252 @@ +From 3bd0fd8f97e7a33a874929a383a42e6c710bfff3 Mon Sep 17 00:00:00 2001 +From: Stephen Kelly <steveire@gmail.com> +Date: Sat, 17 Dec 2016 06:20:06 +0000 +Subject: [PATCH] QSFPM: Fix handling of source model layout change + +In sourceLayoutAboutToBeChanged the source model update is ignored if +the affected parents are filtered out anyway. The same logic is +attempted in the sourceLayoutChanged slot, but there the early-return +logic is applied too late - the mapping is cleared before performing the +early-return. Because pointers into the mapping are used in the +internalPointer of QModelIndexes in this class, persistent indexes used +later will segfault when attempting to dereference it. + +Additionally, if a parent becomes invalid as a result of the +layoutChange, it would be filtered out by the condition in the loop, +resulting in a different result in the comparison of emptiness of the +parents container. + +Fix that by persisting the parent's container, and performing the test +for early-return before clearing the mapping. + +Task-number: QTBUG-47711 +Task-number: QTBUG-32981 +Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97 +Reviewed-by: David Faure <david.faure@kdab.com> +--- + src/corelib/itemmodels/qsortfilterproxymodel.cpp | 31 ++--- + .../tst_qsortfilterproxymodel.cpp | 126 +++++++++++++++++++++ + 2 files changed, 137 insertions(+), 20 deletions(-) + +diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp +index b0ddfa8..3331521 100644 +--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp ++++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp +@@ -171,6 +171,7 @@ public: + QRowsRemoval itemsBeingRemoved; + + QModelIndexPairList saved_persistent_indexes; ++ QList<QPersistentModelIndex> saved_layoutChange_parents; + + QHash<QModelIndex, Mapping *>::const_iterator create_mapping( + const QModelIndex &source_parent) const; +@@ -1331,23 +1332,23 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<Q + Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns + saved_persistent_indexes.clear(); + +- QList<QPersistentModelIndex> parents; ++ saved_layoutChange_parents.clear(); + for (const QPersistentModelIndex &parent : sourceParents) { + if (!parent.isValid()) { +- parents << QPersistentModelIndex(); ++ saved_layoutChange_parents << QPersistentModelIndex(); + continue; + } + const QModelIndex mappedParent = q->mapFromSource(parent); + // Might be filtered out. + if (mappedParent.isValid()) +- parents << mappedParent; ++ saved_layoutChange_parents << mappedParent; + } + + // All parents filtered out. +- if (!sourceParents.isEmpty() && parents.isEmpty()) ++ if (!sourceParents.isEmpty() && saved_layoutChange_parents.isEmpty()) + return; + +- emit q->layoutAboutToBeChanged(parents); ++ emit q->layoutAboutToBeChanged(saved_layoutChange_parents); + if (persistent.indexes.isEmpty()) + return; + +@@ -1359,6 +1360,9 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten + Q_Q(QSortFilterProxyModel); + Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns + ++ if (!sourceParents.isEmpty() && saved_layoutChange_parents.isEmpty()) ++ return; ++ + // Optimize: We only actually have to clear the mapping related to the contents of + // sourceParents, not everything. + qDeleteAll(source_index_mapping); +@@ -1373,21 +1377,8 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten + source_index_mapping.clear(); + } + +- QList<QPersistentModelIndex> parents; +- for (const QPersistentModelIndex &parent : sourceParents) { +- if (!parent.isValid()) { +- parents << QPersistentModelIndex(); +- continue; +- } +- const QModelIndex mappedParent = q->mapFromSource(parent); +- if (mappedParent.isValid()) +- parents << mappedParent; +- } +- +- if (!sourceParents.isEmpty() && parents.isEmpty()) +- return; +- +- emit q->layoutChanged(parents); ++ emit q->layoutChanged(saved_layoutChange_parents); ++ saved_layoutChange_parents.clear(); + } + + void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted( +diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +index 38e3c68..6b98d9f 100644 +--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp ++++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +@@ -145,6 +145,8 @@ private slots: + void canDropMimeData(); + void filterHint(); + ++ void sourceLayoutChangeLeavesValidPersistentIndexes(); ++ + protected: + void buildHierarchy(const QStringList &data, QAbstractItemModel *model); + void checkHierarchy(const QStringList &data, const QAbstractItemModel *model); +@@ -4181,5 +4183,129 @@ void tst_QSortFilterProxyModel::filterHint() + QAbstractItemModel::NoLayoutChangeHint); + } + ++/** ++ ++ Creates a model where each item has one child, to a set depth, ++ and the last item has no children. For a model created with ++ setDepth(4): ++ ++ - 1 ++ - - 2 ++ - - - 3 ++ - - - - 4 ++*/ ++class StepTreeModel : public QAbstractItemModel ++{ ++ Q_OBJECT ++public: ++ StepTreeModel(QObject * parent = 0) ++ : QAbstractItemModel(parent), m_depth(0) {} ++ ++ int columnCount(const QModelIndex& = QModelIndex()) const override { return 1; } ++ ++ int rowCount(const QModelIndex& parent = QModelIndex()) const override ++ { ++ quintptr parentId = (parent.isValid()) ? parent.internalId() : 0; ++ return (parentId < m_depth) ? 1 : 0; ++ } ++ ++ QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override ++ { ++ if (role != Qt::DisplayRole) ++ return QVariant(); ++ ++ return QString::number(index.internalId()); ++ } ++ ++ QModelIndex index(int, int, const QModelIndex& parent = QModelIndex()) const override ++ { ++ quintptr parentId = (parent.isValid()) ? parent.internalId() : 0; ++ if (parentId >= m_depth) ++ return QModelIndex(); ++ ++ return createIndex(0, 0, parentId + 1); ++ } ++ ++ QModelIndex parent(const QModelIndex& index) const override ++ { ++ if (index.internalId() == 0) ++ return QModelIndex(); ++ ++ return createIndex(0, 0, index.internalId() - 1); ++ } ++ ++ void setDepth(quintptr depth) ++ { ++ int parentIdWithLayoutChange = (m_depth < depth) ? m_depth : depth; ++ ++ QList<QPersistentModelIndex> parentsOfLayoutChange; ++ parentsOfLayoutChange.push_back(createIndex(0, 0, parentIdWithLayoutChange)); ++ ++ layoutAboutToBeChanged(parentsOfLayoutChange); ++ ++ auto existing = persistentIndexList(); ++ ++ QList<QModelIndex> updated; ++ ++ for (auto idx : existing) { ++ if (indexDepth(idx) <= depth) ++ updated.push_back(idx); ++ else ++ updated.push_back({}); ++ } ++ ++ m_depth = depth; ++ ++ changePersistentIndexList(existing, updated); ++ ++ layoutChanged(parentsOfLayoutChange); ++ } ++ ++private: ++ static quintptr indexDepth(QModelIndex const& index) ++ { ++ return (index.isValid()) ? 1 + indexDepth(index.parent()) : 0; ++ } ++ ++private: ++ quintptr m_depth; ++}; ++ ++void tst_QSortFilterProxyModel::sourceLayoutChangeLeavesValidPersistentIndexes() ++{ ++ StepTreeModel model; ++ Q_SET_OBJECT_NAME(model); ++ model.setDepth(4); ++ ++ QSortFilterProxyModel proxy1; ++ proxy1.setSourceModel(&model); ++ Q_SET_OBJECT_NAME(proxy1); ++ ++ proxy1.setFilterRegExp("1|2"); ++ ++ // The current state of things: ++ // model proxy ++ // - 1 - 1 ++ // - - 2 - - 2 ++ // - - - 3 ++ // - - - - 4 ++ ++ // The setDepth call below removes '4' with a layoutChanged call. ++ // Because the proxy filters that out anyway, the proxy doesn't need ++ // to emit any signals or update persistent indexes. ++ ++ QPersistentModelIndex persistentIndex = proxy1.index(0, 0, proxy1.index(0, 0)); ++ ++ model.setDepth(3); ++ ++ // Calling parent() causes the internalPointer to be used. ++ // Before fixing QTBUG-47711, that could be a dangling pointer. ++ // The use of qDebug here makes sufficient use of the heap to ++ // cause corruption at runtime with normal use on linux (before ++ // the fix). valgrind confirms the fix. ++ qDebug() << persistentIndex.parent(); ++ QVERIFY(persistentIndex.parent().isValid()); ++} ++ + QTEST_MAIN(tst_QSortFilterProxyModel) + #include "tst_qsortfilterproxymodel.moc" +-- +2.7.4 + + diff --git a/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-2.patch b/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-2.patch new file mode 100644 index 000000000000..973649637e66 --- /dev/null +++ b/dev-qt/qtcore/files/qtcore-5.7.1-qsfpm-2.patch @@ -0,0 +1,195 @@ +From 0874861bcc70313c343aba5e5566ed30b69eed1c Mon Sep 17 00:00:00 2001 +From: Stephen Kelly <steveire@gmail.com> +Date: Mon, 19 Dec 2016 21:13:57 +0000 +Subject: [PATCH] QSFPM: Remove data manipulation from move handlers + +Similar to the fix in the parent commit, incorrect updating of the +internal data structures during layout changes can lead to dangling +pointers being dereferenced later. Moves are treated as layoutChanges +by this proxy by forwarding to the appropriate method. However, data is +incorrectly cleared prior to that forwarding. Remove that, and let the +layoutChange handling take appropriate action. + +Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd +Reviewed-by: David Faure <david.faure@kdab.com> +--- + src/corelib/itemmodels/qsortfilterproxymodel.cpp | 67 ++++------------------ + .../tst_qsortfilterproxymodel.cpp | 46 +++++++++++++++ + 2 files changed, 58 insertions(+), 55 deletions(-) + +diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp +index 3331521..226a240 100644 +--- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp ++++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp +@@ -1418,49 +1418,27 @@ void QSortFilterProxyModelPrivate::_q_sourceRowsRemoved( + void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeMoved( + const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */) + { +- Q_Q(QSortFilterProxyModel); + // Because rows which are contiguous in the source model might not be contiguous + // in the proxy due to sorting, the best thing we can do here is be specific about what + // parents are having their children changed. + // Optimize: Emit move signals if the proxy is not sorted. Will need to account for rows + // being filtered out though. + +- saved_persistent_indexes.clear(); +- + QList<QPersistentModelIndex> parents; +- parents << q->mapFromSource(sourceParent); ++ parents << sourceParent; + if (sourceParent != destParent) +- parents << q->mapFromSource(destParent); +- emit q->layoutAboutToBeChanged(parents); +- if (persistent.indexes.isEmpty()) +- return; +- saved_persistent_indexes = store_persistent_indexes(); ++ parents << destParent; ++ _q_sourceLayoutAboutToBeChanged(parents, QAbstractItemModel::NoLayoutChangeHint); + } + + void QSortFilterProxyModelPrivate::_q_sourceRowsMoved( + const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */) + { +- Q_Q(QSortFilterProxyModel); +- +- // Optimize: We only need to clear and update the persistent indexes which are children of +- // sourceParent or destParent +- qDeleteAll(source_index_mapping); +- source_index_mapping.clear(); +- +- update_persistent_indexes(saved_persistent_indexes); +- saved_persistent_indexes.clear(); +- +- if (dynamic_sortfilter && update_source_sort_column()) { +- //update_source_sort_column might have created wrong mapping so we have to clear it again +- qDeleteAll(source_index_mapping); +- source_index_mapping.clear(); +- } +- + QList<QPersistentModelIndex> parents; +- parents << q->mapFromSource(sourceParent); ++ parents << sourceParent; + if (sourceParent != destParent) +- parents << q->mapFromSource(destParent); +- emit q->layoutChanged(parents); ++ parents << destParent; ++ _q_sourceLayoutChanged(parents, QAbstractItemModel::NoLayoutChangeHint); + } + + void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeInserted( +@@ -1522,42 +1500,21 @@ void QSortFilterProxyModelPrivate::_q_sourceColumnsRemoved( + void QSortFilterProxyModelPrivate::_q_sourceColumnsAboutToBeMoved( + const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */) + { +- Q_Q(QSortFilterProxyModel); +- +- saved_persistent_indexes.clear(); +- + QList<QPersistentModelIndex> parents; +- parents << q->mapFromSource(sourceParent); ++ parents << sourceParent; + if (sourceParent != destParent) +- parents << q->mapFromSource(destParent); +- emit q->layoutAboutToBeChanged(parents); +- +- if (persistent.indexes.isEmpty()) +- return; +- saved_persistent_indexes = store_persistent_indexes(); ++ parents << destParent; ++ _q_sourceLayoutAboutToBeChanged(parents, QAbstractItemModel::NoLayoutChangeHint); + } + + void QSortFilterProxyModelPrivate::_q_sourceColumnsMoved( + const QModelIndex &sourceParent, int /* sourceStart */, int /* sourceEnd */, const QModelIndex &destParent, int /* dest */) + { +- Q_Q(QSortFilterProxyModel); +- +- qDeleteAll(source_index_mapping); +- source_index_mapping.clear(); +- +- update_persistent_indexes(saved_persistent_indexes); +- saved_persistent_indexes.clear(); +- +- if (dynamic_sortfilter && update_source_sort_column()) { +- qDeleteAll(source_index_mapping); +- source_index_mapping.clear(); +- } +- + QList<QPersistentModelIndex> parents; +- parents << q->mapFromSource(sourceParent); ++ parents << sourceParent; + if (sourceParent != destParent) +- parents << q->mapFromSource(destParent); +- emit q->layoutChanged(parents); ++ parents << destParent; ++ _q_sourceLayoutChanged(parents, QAbstractItemModel::NoLayoutChangeHint); + } + + /*! +diff --git a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +index 6b98d9f..7b6c470 100644 +--- a/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp ++++ b/tests/auto/corelib/itemmodels/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp +@@ -146,6 +146,7 @@ private slots: + void filterHint(); + + void sourceLayoutChangeLeavesValidPersistentIndexes(); ++ void rowMoveLeavesValidPersistentIndexes(); + + protected: + void buildHierarchy(const QStringList &data, QAbstractItemModel *model); +@@ -4307,5 +4308,50 @@ void tst_QSortFilterProxyModel::sourceLayoutChangeLeavesValidPersistentIndexes() + QVERIFY(persistentIndex.parent().isValid()); + } + ++void tst_QSortFilterProxyModel::rowMoveLeavesValidPersistentIndexes() ++{ ++ DynamicTreeModel model; ++ Q_SET_OBJECT_NAME(model); ++ ++ QList<int> ancestors; ++ for (auto i = 0; i < 5; ++i) ++ { ++ Q_UNUSED(i); ++ ModelInsertCommand insertCommand(&model); ++ insertCommand.setAncestorRowNumbers(ancestors); ++ insertCommand.setStartRow(0); ++ insertCommand.setEndRow(0); ++ insertCommand.doCommand(); ++ ancestors.push_back(0); ++ } ++ ++ QSortFilterProxyModel proxy1; ++ proxy1.setSourceModel(&model); ++ Q_SET_OBJECT_NAME(proxy1); ++ ++ proxy1.setFilterRegExp("1|2"); ++ ++ auto item5 = model.match(model.index(0, 0), Qt::DisplayRole, "5", 1, Qt::MatchRecursive).first(); ++ auto item3 = model.match(model.index(0, 0), Qt::DisplayRole, "3", 1, Qt::MatchRecursive).first(); ++ ++ Q_ASSERT(item5.isValid()); ++ Q_ASSERT(item3.isValid()); ++ ++ QPersistentModelIndex persistentIndex = proxy1.match(proxy1.index(0, 0), Qt::DisplayRole, "2", 1, Qt::MatchRecursive).first(); ++ ++ ModelMoveCommand moveCommand(&model, 0); ++ moveCommand.setAncestorRowNumbers(QList<int>{0, 0, 0, 0}); ++ moveCommand.setStartRow(0); ++ moveCommand.setEndRow(0); ++ moveCommand.setDestRow(0); ++ moveCommand.setDestAncestors(QList<int>{0, 0, 0}); ++ moveCommand.doCommand(); ++ ++ // Calling parent() causes the internalPointer to be used. ++ // Before fixing QTBUG-47711 (moveRows case), that could be ++ // a dangling pointer. ++ QVERIFY(persistentIndex.parent().isValid()); ++} ++ + QTEST_MAIN(tst_QSortFilterProxyModel) + #include "tst_qsortfilterproxymodel.moc" +-- +2.7.4 + + diff --git a/dev-qt/qtcore/metadata.xml b/dev-qt/qtcore/metadata.xml new file mode 100644 index 000000000000..668f6ab4564e --- /dev/null +++ b/dev-qt/qtcore/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>qt@gentoo.org</email> + <name>Gentoo Qt Project</name> + </maintainer> + <use> + <flag name="exceptions">Add support for exceptions - like catching them + inside the event loop (recommended by upstream)</flag> + <flag name="glib">Enable <pkg>dev-libs/glib</pkg> eventloop support</flag> + <flag name="qt3support">Enable the Qt3Support libraries for Qt4. Note that + this does not mean you can compile pure Qt3 programs with Qt4.</flag> + <flag name="systemd">Enable native journald logging support</flag> + </use> + <upstream> + <bugs-to>https://bugreports.qt.io/</bugs-to> + <doc>https://doc.qt.io/</doc> + </upstream> + <slots> + <subslots> + Must only be used by packages that are known to use private parts of the Qt API. + </subslots> + </slots> +</pkgmetadata> diff --git a/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild b/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild new file mode 100644 index 000000000000..c9a3c5e433bf --- /dev/null +++ b/dev-qt/qtcore/qtcore-4.8.6-r2.ebuild @@ -0,0 +1,86 @@ +# 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 new file mode 100644 index 000000000000..19f8832d3108 --- /dev/null +++ b/dev-qt/qtcore/qtcore-4.8.7-r2.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2017 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" + +if [[ ${QT4_BUILD_TYPE} == release ]]; then + KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd" +fi + +IUSE="+glib iconv icu libressl 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? ( + !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) + libressl? ( dev-libs/libressl:=[${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-moc-boost-1.60.patch" # bug 556104 + "${FILESDIR}/${PN}-4.8.7-libressl.patch" # bug 584796 +) + +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-5.6.2-r1.ebuild b/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild new file mode 100644 index 000000000000..8993a7d4bbf7 --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.6.2-r1.ebuild @@ -0,0 +1,42 @@ +# 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 +} diff --git a/dev-qt/qtcore/qtcore-5.7.1-r3.ebuild b/dev-qt/qtcore/qtcore-5.7.1-r3.ebuild new file mode 100644 index 000000000000..f68f4635ff7b --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.7.1-r3.ebuild @@ -0,0 +1,48 @@ +# 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/double-conversion:= + 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}"/${PN}-5.6.2-plugins.patch + "${FILESDIR}"/${P}-qipm.patch + "${FILESDIR}"/${P}-qsfpm-{1,2}.patch +) + +QT5_TARGET_SUBDIRS=( + src/tools/bootstrap + src/tools/moc + src/tools/rcc + src/corelib + src/tools/qlalr + doc +) + +src_configure() { + local myconf=( + $(qt_use icu) + $(qt_use systemd journald) + ) + qt5-build_src_configure +} diff --git a/dev-qt/qtcore/qtcore-5.9.2.ebuild b/dev-qt/qtcore/qtcore-5.9.2.ebuild new file mode 100644 index 000000000000..779bc30c7b90 --- /dev/null +++ b/dev-qt/qtcore/qtcore-5.9.2.ebuild @@ -0,0 +1,66 @@ +# 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/double-conversion:= + dev-libs/glib:2 + dev-libs/libpcre2[pcre16,unicode] + sys-libs/zlib + icu? ( dev-libs/icu:= ) + !icu? ( virtual/libiconv ) + systemd? ( sys-apps/systemd:= ) +" +RDEPEND="${DEPEND}" + +QT5_TARGET_SUBDIRS=( + src/tools/bootstrap + src/tools/moc + src/tools/rcc + src/tools/qfloat16-tables + src/corelib + src/tools/qlalr + doc +) + +src_configure() { + local myconf=( + $(qt_use icu) + $(qt_use !icu iconv) + $(qt_use systemd journald) + ) + qt5-build_src_configure +} + +src_install() { + qt5-build_src_install + + local flags=( + ALSA CUPS DBUS EGL EGLFS EGL_X11 EVDEV FONTCONFIG FREETYPE + HARFBUZZ IMAGEFORMAT_JPEG IMAGEFORMAT_PNG LIBPROXY MITSHM + OPENGL OPENSSL OPENVG PULSEAUDIO SHAPE SSL TSLIB XCURSOR + XFIXES XKB XRANDR XRENDER XSYNC ZLIB + ) + + for flag in ${flags[@]}; do + cat >> "${D%/}"/${QT5_HEADERDIR}/QtCore/qconfig.h <<- _EOF_ || die + + #if defined(QT_NO_${flag}) && defined(QT_${flag}) + # undef QT_NO_${flag} + #elif !defined(QT_NO_${flag}) && !defined(QT_${flag}) + # define QT_NO_${flag} + #endif + _EOF_ + done +} |