diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-qt/qtdeclarative | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-qt/qtdeclarative')
4 files changed, 265 insertions, 0 deletions
diff --git a/dev-qt/qtdeclarative/Manifest b/dev-qt/qtdeclarative/Manifest index 23d106a585e7..0213aa9fbc3f 100644 --- a/dev-qt/qtdeclarative/Manifest +++ b/dev-qt/qtdeclarative/Manifest @@ -1,8 +1,11 @@ +AUX qtdeclarative-5.13.2-fix-deadlock-on-exit.patch 4042 BLAKE2B 9ad28ad2e9157d63e18da3c807db8f6c7909a87e82d4798ac7c5ada592a0527f44223cb94f6cf527f7fb34e3e2f3bd6fcf250a44b420500a4d3b4bf7d5ece586 SHA512 6a0d8f3b3d9cc53c23d8ca5942b266d95d1d94a1045d7125c97e23724522913d94bf8b8430d501a2a1f8d39a50f74cf673a63ce5437caa582cfe12e7b525ad9b +AUX qtdeclarative-5.13.2-read-QQmlPropertyMap-correctly.patch 3348 BLAKE2B 54a263b72e7010271b5ce2fd8ed687ce19270cdf27029ea515a34795b036cae8f582e6f7b1ffcb815be660ac81f1b53b93918c3bda098f614cbc3b51ea80bb60 SHA512 e71ddab29cf35fa4cb1334147b1c5b6771860e68fd1e2e4958fb6cfb1489c567b0d209dfa1ba5e56119e5a61ee2039e8f3af75bd410ab187c2d61ac74a8c0b35 AUX qtdeclarative-5.4.2-disable-jit.patch 547 BLAKE2B 3f9cc85ab9ec7c2b79aad8bcbfe541ba51745f62e3f02111a2f455c6d1a7959c7980284e3a655ce8335d4a166d65570f2b9d236c681d155c015cc14dc3bb54af SHA512 cd410c0e731a1e096bd8a77b7ecc769a5e3503f7a2f12668f2f4f1c3099973eaa2060d97708962e422c580ee76ee3db3712834cd994b7e1aeeb57c0a4c3b0b3d DIST qtdeclarative-everywhere-src-5.12.3.tar.xz 20513544 BLAKE2B b6c622cb4728d54d0cf382a5a50af4652755ebd1f8e7ebc8bf07a5f3e3355931703ffa443be11dcf36a132b2f3eacb5fce150088209d173f2ca84bc387096026 SHA512 0caddcfee36cbf52bacd3a400d304511255715e2b5a58c1621ca8120610427c57511785457a9e7fa55975b86e7924a3cffddeb7e2e8e6622af85b7ebac35dd20 DIST qtdeclarative-everywhere-src-5.12.5.tar.xz 20512492 BLAKE2B 3e8175217bb9e654db8c57cee55080ea630452fe8c225db5350da00b5fb6c9cb6269b075939eab411cd750a1a431a423522c1bb536b2a1f708bd497d90817301 SHA512 026c5024c06e44b6e91099d1ee912f38017f314ae0125227010d25d733447c692299cc7c47edc1a4bf39366a9c9c9fe77d3a249905f2ae982d0725317d824b9b DIST qtdeclarative-everywhere-src-5.13.2.tar.xz 20940748 BLAKE2B acc688691a86318478a3f016821bf6e84ba3a552e4f8613414a51ecde8e588783ed80e53eed31bbc321945950754991d20a29290e9cf3b878c5415d1049be3cc SHA512 a3fcc65eccdd598c03991978db6462293781abc80affd9a489253d4a812073832554892d503fa0de32a9ef97ddc74b9ad71e2bd7cfa2f21ce1fc64d1358ab730 EBUILD qtdeclarative-5.12.3.ebuild 1186 BLAKE2B 45edac1996283de69288f708561a8782b15b069ca0a6da45fb7976676ddea6db56036168c749aa6912213800f302a14834c099f15407f8d2985d6ad8405c9f05 SHA512 4467dd52f853509bf37ae78cc06bd58e3d7577ba00882fe1942fe3e04d77df9dca722c4cfda219f56f73855588c7ba936407e2aebfd67d13c55cdadcadab587c EBUILD qtdeclarative-5.12.5.ebuild 1157 BLAKE2B 9ed30b4e7f4379f2ce58c3bccfdc48385ca15d7c2f11955c4c05400fda8c977c29c4e4a3df2df52c924da291f754421468d8b32de54854f094b93b394e15477a SHA512 a9c2e60bec5e98b7c44346fe32ec905656be41a2716edf8537641c0872165113bfd467edbdc72583e86101cf15b1f8e4b65b4c7cc335ef16c026a472de76cedf +EBUILD qtdeclarative-5.13.2-r1.ebuild 1303 BLAKE2B 084232652fe6b7868e25a7b1ea5a012c195b5ead78bfa395928b9f95eccd66deeff398f023dd31330bccf8eb75f5ab708abea6666e9bb6fb67ea7327fd6dd1ee SHA512 81d8e782b8f316c0dad168ead41d10b7c2128115e47214fd7a521e94ea5e4d094c819448a959e79fc1513a5a091326d7d2957c222a9e42e554a77b2e450eaf18 EBUILD qtdeclarative-5.13.2.ebuild 1158 BLAKE2B b7fb48cd79982f41facd25f62f2a7a8226f60c5bd9a701ca399d2c030482ba1437047c2012b9e2a47b4c3887871a1cffdf5730861de516a22ece17c1c46df513 SHA512 58218bbabdbba272f55bf2feec68d9100ede9697b7c86a27aae78ac4079956e3f58c23f061f8727121630a861308fe72c263c2cb37a0d428973c858fbbe3251c MISC metadata.xml 718 BLAKE2B 8726e8349c867c54347bb2fae219fb858a2f31058d7fa83fb7aa5691b3dbff327a9b2ef4cdbfdfc087fe30847d037f55ed92a2797ad961764676c10d348148a5 SHA512 827be20878184958800c2b31b4fcff95e67bfff208d4669c4b0b1f190bbc8ebeb46795e62c06f46dd8ef54c072e82fe9f1b32bef14072e81c8f1dc7428e386c3 diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-fix-deadlock-on-exit.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-fix-deadlock-on-exit.patch new file mode 100644 index 000000000000..09c4ad831c54 --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-fix-deadlock-on-exit.patch @@ -0,0 +1,112 @@ +From 73ad6e87bbeceea5830ab3a6b3dc66fa99e30f45 Mon Sep 17 00:00:00 2001 +From: Fabian Kosmale <fabian.kosmale@qt.io> +Date: Mon, 28 Oct 2019 13:41:11 +0100 +Subject: [PATCH] QQuickItem::setParentItem: add child earlier + +Calling (de)refWindow can trigger QQuickItem::windowChanged, which in turn +can call a user defined windowChanged handler. If that signal handler +were to call setParentItem, we would encounter an inconsistent state: +The item already has its parent set, but that parent would lack the item +in its children list (as we would only call refWindow at a later point). + +Fixes: QTBUG-79573 +Fixes: QTBUG-73439 +Change-Id: I46adaa54a0521b5cd7f37810b3dd1a206e6a09c6 +Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> +--- + src/quick/items/qquickitem.cpp | 21 +++++++++++++++++---- + .../qquickitem/data/setParentInWindowChange.qml | 12 ++++++++++++ + tests/auto/quick/qquickitem/tst_qquickitem.cpp | 8 ++++++++ + 3 files changed, 37 insertions(+), 4 deletions(-) + create mode 100644 tests/auto/quick/qquickitem/data/setParentInWindowChange.qml + +diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp +index 396012e1e67..26f02aeed7f 100644 +--- a/src/quick/items/qquickitem.cpp ++++ b/src/quick/items/qquickitem.cpp +@@ -2748,22 +2748,35 @@ void QQuickItem::setParentItem(QQuickItem *parentItem) + } + + QQuickWindow *parentWindow = parentItem ? QQuickItemPrivate::get(parentItem)->window : nullptr; ++ bool alreadyAddedChild = false; + if (d->window == parentWindow) { + // Avoid freeing and reallocating resources if the window stays the same. + d->parentItem = parentItem; + } else { +- if (d->window) +- d->derefWindow(); ++ auto oldParentItem = d->parentItem; + d->parentItem = parentItem; ++ if (d->parentItem) { ++ QQuickItemPrivate::get(d->parentItem)->addChild(this); ++ alreadyAddedChild = true; ++ } ++ if (d->window) { ++ d->derefWindow(); ++ // as we potentially changed d->parentWindow above ++ // the check in derefWindow could not work ++ // thus, we redo it here with the old parent ++ if (!oldParentItem) { ++ QQuickWindowPrivate::get(d->window)->parentlessItems.remove(this); ++ } ++ } + if (parentWindow) + d->refWindow(parentWindow); + } + + d->dirty(QQuickItemPrivate::ParentChanged); + +- if (d->parentItem) ++ if (d->parentItem && !alreadyAddedChild) + QQuickItemPrivate::get(d->parentItem)->addChild(this); +- else if (d->window) ++ else if (d->window && !alreadyAddedChild) + QQuickWindowPrivate::get(d->window)->parentlessItems.insert(this); + + d->setEffectiveVisibleRecur(d->calcEffectiveVisible()); +diff --git a/tests/auto/quick/qquickitem/data/setParentInWindowChange.qml b/tests/auto/quick/qquickitem/data/setParentInWindowChange.qml +new file mode 100644 +index 00000000000..d68b7adb72a +--- /dev/null ++++ b/tests/auto/quick/qquickitem/data/setParentInWindowChange.qml +@@ -0,0 +1,12 @@ ++import QtQuick 2.12 ++ ++Rectangle { ++ width: 800 ++ height: 600 ++ Item { ++ id: it ++ onWindowChanged: () => it.parent = newParent ++ } ++ ++ Item { id: newParent } ++} +diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +index 7e132f97b67..9ce9766c925 100644 +--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp ++++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +@@ -197,6 +197,8 @@ private slots: + void qtBug60123(); + #endif + ++ void setParentCalledInOnWindowChanged(); ++ + private: + + enum PaintOrderOp { +@@ -2145,6 +2147,12 @@ void tst_qquickitem::qtBug60123() + activateWindowAndTestPress(&window); + } + #endif ++void tst_qquickitem::setParentCalledInOnWindowChanged() ++{ ++ QQuickView view; ++ view.setSource(testFileUrl("setParentInWindowChange.qml")); ++ QVERIFY(ensureFocus(&view)); // should not crash ++} + + QTEST_MAIN(tst_qquickitem) + +-- +2.16.3 diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-read-QQmlPropertyMap-correctly.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-read-QQmlPropertyMap-correctly.patch new file mode 100644 index 000000000000..63f4235c9e7c --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.13.2-read-QQmlPropertyMap-correctly.patch @@ -0,0 +1,92 @@ +From bcbc3c9cec1f7d7bb8c9d5f5ea94eb5c81ec2853 Mon Sep 17 00:00:00 2001 +From: Fabian Kosmale <fabian.kosmale@qt.io> +Date: Wed, 30 Oct 2019 10:15:23 +0100 +Subject: [PATCH] QQmlProperty: handle reads of QQmlPropertyMap correctly + +Fixes: QTBUG-79614 +Change-Id: Iaf84c0178dc88072a367da2b42b09554b85c7d57 +Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> +--- + src/qml/qml/qqmlproperty.cpp | 12 +++++++++--- + tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp | 21 +++++++++++++++++++++ + 2 files changed, 30 insertions(+), 3 deletions(-) + +diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp +index c8166695bad..a394ed1ad9a 100644 +--- a/src/qml/qml/qqmlproperty.cpp ++++ b/src/qml/qml/qqmlproperty.cpp +@@ -63,6 +63,7 @@ + #include <private/qqmlvaluetypewrapper_p.h> + #include <QtCore/qdebug.h> + #include <cmath> ++#include <QtQml/QQmlPropertyMap> + + Q_DECLARE_METATYPE(QList<int>) + Q_DECLARE_METATYPE(QList<qreal>) +@@ -331,10 +332,15 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name) + + return; + } else { +- if (!property->isQObject()) +- return; // Not an object property ++ if (!property->isQObject()) { ++ if (auto asPropertyMap = qobject_cast<QQmlPropertyMap*>(currentObject)) ++ currentObject = asPropertyMap->value(path.at(ii).toString()).value<QObject*>(); ++ else ++ return; // Not an object property, and not a property map ++ } else { ++ property->readProperty(currentObject, ¤tObject); ++ } + +- property->readProperty(currentObject, ¤tObject); + if (!currentObject) return; // No value + + } +diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp +index 27e06c6f674..ed213cd01aa 100644 +--- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp ++++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp +@@ -37,6 +37,7 @@ + #include <QtCore/qdir.h> + #include <QtCore/private/qobject_p.h> + #include "../../shared/util.h" ++#include <QtQml/QQmlPropertyMap> + + #include <QDebug> + class MyQmlObject : public QObject +@@ -149,6 +150,8 @@ private slots: + void floatToStringPrecision(); + + void copy(); ++ ++ void nestedQQmlPropertyMap(); + private: + QQmlEngine engine; + }; +@@ -2106,6 +2109,24 @@ void tst_qqmlproperty::initTestCase() + qmlRegisterType<MyContainer>("Test",1,0,"MyContainer"); + } + ++void tst_qqmlproperty::nestedQQmlPropertyMap() ++{ ++ QQmlPropertyMap mainPropertyMap; ++ QQmlPropertyMap nestedPropertyMap; ++ QQmlPropertyMap deeplyNestedPropertyMap; ++ ++ mainPropertyMap.insert("nesting1", QVariant::fromValue(&nestedPropertyMap)); ++ nestedPropertyMap.insert("value", 42); ++ nestedPropertyMap.insert("nesting2", QVariant::fromValue(&deeplyNestedPropertyMap)); ++ deeplyNestedPropertyMap.insert("value", "success"); ++ ++ QQmlProperty value{&mainPropertyMap, "nesting1.value"}; ++ QCOMPARE(value.read().toInt(), 42); ++ ++ QQmlProperty success{&mainPropertyMap, "nesting1.nesting2.value"}; ++ QCOMPARE(success.read().toString(), QLatin1String("success")); ++} ++ + QTEST_MAIN(tst_qqmlproperty) + + #include "tst_qqmlproperty.moc" +-- +2.16.3 diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.13.2-r1.ebuild b/dev-qt/qtdeclarative/qtdeclarative-5.13.2-r1.ebuild new file mode 100644 index 000000000000..24def17bec0d --- /dev/null +++ b/dev-qt/qtdeclarative/qtdeclarative-5.13.2-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 2009-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) +inherit python-any-r1 qt5-build + +DESCRIPTION="The QML and Quick modules for the Qt5 framework" + +if [[ ${QT5_BUILD_TYPE} == release ]]; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86" +fi + +IUSE="gles2 +jit localstorage +widgets" + +BDEPEND="${PYTHON_DEPS}" +# qtgui[gles2=] is needed because of bug 504322 +DEPEND=" + ~dev-qt/qtcore-${PV} + ~dev-qt/qtgui-${PV}[gles2=] + ~dev-qt/qtnetwork-${PV} + ~dev-qt/qttest-${PV} + localstorage? ( ~dev-qt/qtsql-${PV} ) + widgets? ( ~dev-qt/qtwidgets-${PV}[gles2=] ) +" +RDEPEND="${DEPEND} + !<dev-qt/qtquickcontrols-5.7:5 +" + +PATCHES=( + "${FILESDIR}/${P}-read-QQmlPropertyMap-correctly.patch" # QTBUG-79614 + "${FILESDIR}/${P}-fix-deadlock-on-exit.patch" # QTBUG-79573 +) + +src_prepare() { + use jit || PATCHES+=("${FILESDIR}/${PN}-5.4.2-disable-jit.patch") + + qt_use_disable_mod localstorage sql \ + src/imports/imports.pro + + qt_use_disable_mod widgets widgets \ + src/src.pro \ + src/qmltest/qmltest.pro \ + tests/auto/auto.pro \ + tools/tools.pro \ + tools/qmlscene/qmlscene.pro \ + tools/qml/qml.pro + + qt5-build_src_prepare +} + +src_configure() { + local myqmakeargs=( + -- + -qml-debug + ) + qt5-build_src_configure +} |