diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-16 03:02:52 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-16 03:02:52 +0000 |
commit | b0735771a80a647a2ea5a03a87d5873d175bd744 (patch) | |
tree | aed120d0dfeab57cb7f38b7a5d186b1c53ae10cd /dev-qt/qtdeclarative | |
parent | 57d1fe5ae0c56e604db5d29bf7b62d685c42e043 (diff) |
gentoo auto-resync : 16:11:2024 - 03:02:52
Diffstat (limited to 'dev-qt/qtdeclarative')
-rw-r--r-- | dev-qt/qtdeclarative/Manifest | 4 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-125053.patch | 258 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-130767.patch | 255 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/qtdeclarative-6.8.0-r7.ebuild (renamed from dev-qt/qtdeclarative/qtdeclarative-6.8.0-r5.ebuild) | 3 |
4 files changed, 518 insertions, 2 deletions
diff --git a/dev-qt/qtdeclarative/Manifest b/dev-qt/qtdeclarative/Manifest index 492d035ead52..9d1c39f4e4ca 100644 --- a/dev-qt/qtdeclarative/Manifest +++ b/dev-qt/qtdeclarative/Manifest @@ -2,8 +2,10 @@ AUX qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch 1566 BLAKE2B b643 AUX qtdeclarative-6.7.3-QTBUG-125053.patch 9583 BLAKE2B d7bdfe4d0a002e5d17f57604dbece3294596a76d03bc3c12a05622d2c95a16bde4bb128d19c63e4856270a875c5b6b866c9cfed9f30a346b441a2b81e7cdf2d1 SHA512 3811879d972ff5a0dbfca98c2c2931f50dd9906dc0ecf75f13e59eae71d9d27dfc9279ba9952a00be81cab83e8f8e42e798d9b43d7d3d6974a1676f4e8e401ea AUX qtdeclarative-6.7.3-QTBUG-129165.patch 5469 BLAKE2B fa4ce581df827b6725b6ab3135fb95fba492814d19d72b7b3be75b621a91f98d534152c5d80b7e1f21e9d877979a1b0e3a09d9eafa034e702d31996bc9624670 SHA512 605ecb6f7e3412b9c59b4e7579df87be1d19846fe1977682cb548732fe57993321015dabe5c5a87ebb15ae3cd394059a5d25d8b24f607093f5cf6343fbb7a4d7 AUX qtdeclarative-6.7.3-QTBUG-129622.patch 2811 BLAKE2B 998cc23491e21cde656d6b8f92a1924652a26343c09eaed9a4ffe23e1782b95960a41d40b3a78a2bb41b4687bc491b46969db8f610f050c87eef09a670544d90 SHA512 5a4ded399bd58d23a4c6dcc6cb82b4ef2cd15d099dbfc742a916f40899166c43893eb8d19494b7fc58d11dbe17532bb3d647b6638f63e7ca354f650d67c1ca95 +AUX qtdeclarative-6.8.0-QTBUG-125053.patch 9540 BLAKE2B 83c465cdcf391968cd835efdcd24512915a91ffafc50291c75605362bbb67ca8dcea3ca4e65612d003d021e1e2c027418532fc4e36b8e36b1edc73d5478c6dea SHA512 872a417bb611d15087dcb37883e5df028ec2b51375ecb9e166ad6a4126e26adbff22836c9dbf58fcbe3683a946f1ba7e7088fd8f3d6b3d46fd510a19d6d4ef17 AUX qtdeclarative-6.8.0-QTBUG-129500.patch 3440 BLAKE2B 8823171026034a5a181997a04345b209b6349488287ea5a72003f236bdd3c4441ab2f8b1bef5affab040ac2ff9507844b6d51d4157db1a97dfa47461f2132344 SHA512 d244c115617d39e844aac4ce5991fdaff8799dfe5661ec9354945df0bab360d29088c6a799bb25c10e749e871c61d226eab50206462e24dec350aa93d8a6efaa AUX qtdeclarative-6.8.0-QTBUG-129797.patch 1236 BLAKE2B edfa939f1438031c1a0b168dc493806d372f072d3b104975da56711c2ee2df402aba076ca7071576ed98a8bdb0668af2f7258c6d2a9f4ae68192473b1630fb39 SHA512 9cc280dccc08aa0bacd0d5ce34dbd1ab6cebf3bcc3cbe4854b03c1e12971619993845d9689b146cb89557c2dbe7b0a44870e6bb0cb1e1d6b4a89924a19b8be7d +AUX qtdeclarative-6.8.0-QTBUG-130767.patch 8301 BLAKE2B 87e67017da7b2a1a9410fb6c6988c6418222fbcae9104fed00f94ca04d5825a2b071c04e49c304e128dc3f639ca138ec231246c8f2c5d726c22a75839e6f7149 SHA512 9b183f77d4121019fae93b73461373c1f5c36618202a4085ada637fb6ed7cc8007c03f29653159046a1666250fd43ac163a496ab639c5c364180ade322f3ac7e DIST qtdeclarative-5.15.14-gentoo-kde-1.tar.xz 26628 BLAKE2B 2b8302b96e5a8cae374da43dfaa5c5c7bf66ddfaa4fed055850fe7b39b995b1416268b94fb98fbc7074b6a0da47e8f9232751dba34b6021e095d7f9339fbfdd9 SHA512 3d4f3cc023e9da32105520bbe74847bb438ec3af85cf6203321400d451902071115ed3cc0c42e8cf995d0304f86cda11096223ad99b09a7dd95b3d83291a7b4a DIST qtdeclarative-everywhere-opensource-src-5.15.14.tar.xz 21595408 BLAKE2B c88388bd04636bc55cad17d97a9f3ee2d3bda6b585cad59d70106bd4e14bf37570bba5edc21627bc08852034adcb483b4c23d7f21ba523dc9e7b6c1f0386a994 SHA512 06c48938c5ab96c4a9e010fdf4a8fbf2b84b7669a486298044363048de3b7da01aa5d9284d1b08b563331887e326befb25566f9972f5143ca3cde47016394bbd DIST qtdeclarative-everywhere-src-6.7.2.tar.xz 35629324 BLAKE2B a2c5a17e2f88dd91dd7ae21950d8bb7bc0856f1f05a093405c68e1b3b584a75fee474a9a7116a1797c464e2ca92778ebec774d4afa5ac6eebb1022daabad8868 SHA512 ca172e79af317f481d6f5e6388dc074fc6f99966b896135ab9991fa1a9502e46b0ac21b7f2bc38278448939e77882c5fd17252e3e6460c1665f8156fa99bceaf @@ -12,7 +14,7 @@ DIST qtdeclarative-everywhere-src-6.8.0.tar.xz 37029068 BLAKE2B 272c673eb06ad28b EBUILD qtdeclarative-5.15.14.ebuild 1537 BLAKE2B 9515ce8d7c01fa8119ecc030871048dece2da2051a67cc1bf61907db5fb1ceeee7ca52503068a9059c3822df398d90e2fec630529a2f88a1ca707ac1c9ef9250 SHA512 d684a28aeda630154eb7c1023dbf231baf5cde528788cb3fbaab35e24a349dd585519aff99d44c405fc6f5f92e9f52d49f30cbbb11c908cf5f42e8d7f5826543 EBUILD qtdeclarative-6.7.2.ebuild 1175 BLAKE2B 4f4d132a22d7987afcb7164ce83e35358b664cc70013f269af95e72b353cfc0103d3953fa308532dfbd00ce0f703c33e341e8a829c1a6bb62a09c07ec8cb7910 SHA512 48af79fdeff33c7d2da696364e1dc1a6694d9a6428a8aae11c5bd2ad2046f7a82bb780824da9a1aef1741322680534cd0d261a50acf235ae3b4fb0f8346d7dc7 EBUILD qtdeclarative-6.7.3-r4.ebuild 1913 BLAKE2B 2e0fff6218ad15659d0ed07c0b41d24c073c7d5e4af65be98831b240682c3369097ecf1f54d7ff5659a9596d861a45e0a03371bd52e637bd29c25bd06d37559c SHA512 ce1776ec512680642899ae5d12224c77c3ff4f94caaebb454959d436d8c80da1ec72ac8752de3491206d8427caf4b2e07a9a9eae52f226ee02aa7ef3e04be895 -EBUILD qtdeclarative-6.8.0-r5.ebuild 1962 BLAKE2B 7d35b6371e462180097f6d22457994eb1f54c8102861bd5cdde7b8ff0ea391923e097edb47f9752ac0790bd42368b7b1e444d21d412e354584f068507f0e4f53 SHA512 4b66328780a108adfeafdd8eba9f7dc24618096923e857d753e2d0deb088f0cfb395b54385477fc9a5b45afb5551e760eab3677ebb321cd2910f21a8001fe821 +EBUILD qtdeclarative-6.8.0-r7.ebuild 2008 BLAKE2B 37676d51f48a64169fb4ecc6c69efc2cb2edc90f3a4ed5355f067df6a4c1fa9030e79c50e9df55e0b69c4dc82437f6edb5b81fa68100dfdc6878afb3369d5550 SHA512 e09f9c9e837a115647ffe6d30a21d6836178ad7d0c26df2660b5cc1825a1c13dab3c01619258ca4455ffb3cc6c40563733d1b200ae2c5dcb93964ffc68e39d1c EBUILD qtdeclarative-6.8.9999.ebuild 1739 BLAKE2B 434181ff4ee1fcb2d11b034c977b73bc23225cfe44d0ac5ee048620e2940fb0273c682defe6247d90a1052ad935e418c8c81881a5378d8f5b5f466a147f42120 SHA512 057e76f4969535d8437cbc02e8999aa70656e8256e95ba1e20f3a1bcab34a1bef0fe80812799eb608f3c9c0cb18eb06ad0a3ca04e7e6537997f81ff0136ddd35 EBUILD qtdeclarative-6.9999.ebuild 1739 BLAKE2B 434181ff4ee1fcb2d11b034c977b73bc23225cfe44d0ac5ee048620e2940fb0273c682defe6247d90a1052ad935e418c8c81881a5378d8f5b5f466a147f42120 SHA512 057e76f4969535d8437cbc02e8999aa70656e8256e95ba1e20f3a1bcab34a1bef0fe80812799eb608f3c9c0cb18eb06ad0a3ca04e7e6537997f81ff0136ddd35 MISC metadata.xml 945 BLAKE2B 8a5d26ab3274cb9ca8b7cf3dceddcd33d9690cd20194adc63b80cd5e13e11d222d48473232b4e2cb41cecf1f51b33df4458811b6fb622a41519f0f3f0223b578 SHA512 a4c587afdbb0320e0f23f47a3ae58e2f69e86a0f539bf613c275ab0be7b9490d33d9c9de35ace02d3cfef903f3e6c7caf492cfdfa53c989b2d56e6c7288f4552 diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-125053.patch b/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-125053.patch new file mode 100644 index 000000000000..250a33f7b166 --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-125053.patch @@ -0,0 +1,258 @@ +https://bugreports.qt.io/browse/QTBUG-125053 +https://bugreports.qt.io/browse/QTBUG-127340 +https://codereview.qt-project.org/c/qt/qtdeclarative/+/593122 +https://bugs.gentoo.org/943527 (see also) +--- a/src/qmlmodels/qqmldelegatemodel.cpp ++++ b/src/qmlmodels/qqmldelegatemodel.cpp +@@ -4,4 +4,6 @@ + #include "qqmldelegatemodel_p_p.h" + ++#include <QtCore/private/qabstractitemmodel_p.h> ++ + #include <QtQml/qqmlinfo.h> + +@@ -172,5 +174,4 @@ + , m_incubatorCleanupScheduled(false) + , m_waitingToFetchMore(false) +- , m_maybeResetRoleNames(false) + , m_cacheItems(nullptr) + , m_items(nullptr) +@@ -366,5 +367,4 @@ + QObject::connect(aim, &QAbstractItemModel::rowsMoved, q, &QQmlDelegateModel::_q_rowsMoved); + QObject::connect(aim, &QAbstractItemModel::modelAboutToBeReset, q, &QQmlDelegateModel::_q_modelAboutToBeReset); +- QObject::connect(aim, &QAbstractItemModel::modelReset, q, &QQmlDelegateModel::handleModelReset); + QObject::connect(aim, &QAbstractItemModel::layoutChanged, q, &QQmlDelegateModel::_q_layoutChanged); + } +@@ -387,5 +387,4 @@ + QObject::disconnect(aim, &QAbstractItemModel::rowsMoved, q, &QQmlDelegateModel::_q_rowsMoved); + QObject::disconnect(aim, &QAbstractItemModel::modelAboutToBeReset, q, &QQmlDelegateModel::_q_modelAboutToBeReset); +- QObject::disconnect(aim, &QAbstractItemModel::modelReset, q, &QQmlDelegateModel::handleModelReset); + QObject::disconnect(aim, &QAbstractItemModel::layoutChanged, q, &QQmlDelegateModel::_q_layoutChanged); + } +@@ -412,4 +411,19 @@ + d->requestMoreIfNecessary(); + } ++ ++ // Since 837c2f18cd223707e7cedb213257b0158ea07146, we connect to modelAboutToBeReset ++ // rather than modelReset so that we can handle role name changes. _q_modelAboutToBeReset ++ // now connects modelReset to handleModelReset with a single shot connection instead. ++ // However, it's possible for user code to begin the reset before connectToAbstractItemModel is called ++ // (QTBUG-125053), in which case we connect to modelReset too late and handleModelReset is never called, ++ // resulting in delegates not being created in certain cases. ++ // So, we check at the earliest point we can if the model is in the process of being reset, ++ // and if so, connect modelReset to handleModelReset. ++ if (d->m_adaptorModel.adaptsAim()) { ++ auto *aim = d->m_adaptorModel.aim(); ++ auto *aimPrivate = QAbstractItemModelPrivate::get(aim); ++ if (aimPrivate->resetting) ++ QObject::connect(aim, &QAbstractItemModel::modelReset, this, &QQmlDelegateModel::handleModelReset, Qt::SingleShotConnection); ++ } + } + +@@ -1898,26 +1912,23 @@ + if (!d->m_adaptorModel.adaptsAim()) + return; +- +- /* +- roleNames are generally guaranteed to be stable (given that QAIM has no +- change signal for them), except that resetting the model is allowed to +- invalidate them (QTBUG-32132). DelegateModel must take this into account by +- snapshotting the current roleNames before the model is reset. +- Afterwards, if we detect that roleNames has changed, we throw the +- current model set up away and rebuild everything from scratch – it is +- unlikely that a more efficient implementation would be worth it. +- +- If we detect no changes, we simply use the existing logic to handle the +- model reset. +- +- This (role name resetting) logic relies on the fact that +- modelAboutToBeReset must be followed by a modelReset signal before any +- further modelAboutToBeReset can occur. However, it's possible for user +- code to begin the reset before connectToAbstractItemModel is called +- (QTBUG-125053), in which case we don't attempt to reset the role names. +- */ +- Q_ASSERT(!d->m_maybeResetRoleNames); +- d->m_maybeResetRoleNames = true; +- d->m_roleNamesBeforeReset = d->m_adaptorModel.aim()->roleNames(); ++ auto aim = d->m_adaptorModel.aim(); ++ auto oldRoleNames = aim->roleNames(); ++ // this relies on the fact that modelAboutToBeReset must be followed ++ // by a modelReset signal before any further modelAboutToBeReset can occur ++ QObject::connect(aim, &QAbstractItemModel::modelReset, this, [this, d, oldRoleNames, aim](){ ++ if (!d->m_adaptorModel.adaptsAim() || d->m_adaptorModel.aim() != aim) ++ return; ++ if (oldRoleNames == aim->roleNames()) { ++ // if the rolenames stayed the same (most common case), then we don't have ++ // to throw away all the setup that we did ++ handleModelReset(); ++ } else { ++ // If they did change, we give up and just start from scratch via setMode ++ setModel(QVariant::fromValue(model())); ++ // but we still have to call handleModelReset, otherwise views will ++ // not refresh ++ handleModelReset(); ++ } ++ }, Qt::SingleShotConnection); + } + +@@ -1929,21 +1940,4 @@ + + int oldCount = d->m_count; +- +- if (d->m_maybeResetRoleNames) { +- auto aim = d->m_adaptorModel.aim(); +- if (!d->m_adaptorModel.adaptsAim() || d->m_adaptorModel.aim() != aim) +- return; +- +- // If the role names stayed the same (most common case), then we don't have +- // to throw away all the setup that we did. +- // If they did change, we give up and just start from scratch via setModel. +- // We do this before handling the reset to ensure that views refresh. +- if (aim->roleNames() != d->m_roleNamesBeforeReset) +- setModel(QVariant::fromValue(model())); +- +- d->m_maybeResetRoleNames = false; +- d->m_roleNamesBeforeReset.clear(); +- } +- + d->m_adaptorModel.rootIndex = QModelIndex(); + +--- a/src/qmlmodels/qqmldelegatemodel_p_p.h ++++ b/src/qmlmodels/qqmldelegatemodel_p_p.h +@@ -335,5 +335,4 @@ + QList<QQDMIncubationTask *> m_finishedIncubating; + QList<QByteArray> m_watchedRoles; +- QHash<int, QByteArray> m_roleNamesBeforeReset; + + QString m_filterGroup; +@@ -349,5 +348,4 @@ + bool m_incubatorCleanupScheduled : 1; + bool m_waitingToFetchMore : 1; +- bool m_maybeResetRoleNames : 1; + + union { +--- a/tests/auto/qml/qqmldelegatemodel/data/proxyModelWithDelayedSourceModelInListView.qml ++++ b/tests/auto/qml/qqmldelegatemodel/data/proxyModelWithDelayedSourceModelInListView.qml +@@ -0,0 +1,30 @@ ++import QtQuick ++import Test ++ ++Window { ++ id: root ++ title: listView.count ++ ++ property alias listView: listView ++ property ProxySourceModel connectionModel: null ++ ++ Component { ++ id: modelComponent ++ ProxySourceModel {} ++ } ++ ++ ListView { ++ id: listView ++ anchors.fill: parent ++ ++ delegate: Text { ++ text: model.Name ++ } ++ ++ model: ProxyModel { ++ sourceModel: root.connectionModel ++ } ++ } ++ ++ Component.onCompleted: root.connectionModel = modelComponent.createObject(root) ++} +--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp ++++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +@@ -4,4 +4,5 @@ + #include <QtTest/qtest.h> + #include <QtCore/qjsonobject.h> ++#include <QtCore/qsortfilterproxymodel.h> + #include <QtCore/QConcatenateTablesProxyModel> + #include <QtCore/qtimer.h> +@@ -52,4 +53,5 @@ + void clearCacheDuringInsertion(); + void viewUpdatedOnDelegateChoiceAffectingRoleChange(); ++ void proxyModelWithDelayedSourceModelInListView(); + }; + +@@ -732,4 +734,77 @@ + } + ++class ProxySourceModel : public QAbstractListModel ++{ ++ Q_OBJECT ++ QML_ELEMENT ++public: ++ explicit ProxySourceModel(QObject *parent = nullptr) ++ : QAbstractListModel(parent) ++ { ++ for (int i = 0; i < rows; ++i) { ++ beginInsertRows(QModelIndex(), i, i); ++ endInsertRows(); ++ } ++ } ++ ++ ~ProxySourceModel() override = default; ++ ++ int rowCount(const QModelIndex &) const override ++ { ++ return rows; ++ } ++ ++ QVariant data(const QModelIndex &, int ) const override ++ { ++ return "Hello"; ++ } ++ ++ QHash<int, QByteArray> roleNames() const override ++ { ++ QHash<int, QByteArray> roles = QAbstractListModel::roleNames(); ++ roles[Qt::UserRole + 1] = "Name"; ++ ++ return roles; ++ } ++ ++ static const int rows = 1; ++}; ++ ++class ProxyModel : public QSortFilterProxyModel ++{ ++ Q_OBJECT ++ QML_ELEMENT ++ Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel WRITE setSourceModel) ++ ++public: ++ explicit ProxyModel(QObject *parent = nullptr) ++ : QSortFilterProxyModel(parent) ++ { ++ } ++ ++ ~ProxyModel() override = default; ++}; ++ ++// Checks that the correct amount of delegates are created when using a proxy ++// model whose source model is set after a delay. ++void tst_QQmlDelegateModel::proxyModelWithDelayedSourceModelInListView() ++{ ++ QTest::failOnWarning(); ++ ++ qmlRegisterTypesAndRevisions<ProxySourceModel>("Test", 1); ++ qmlRegisterTypesAndRevisions<ProxyModel>("Test", 1); ++ ++ QQuickApplicationHelper helper(this, "proxyModelWithDelayedSourceModelInListView.qml"); ++ QVERIFY2(helper.ready, helper.failureMessage()); ++ QQuickWindow *window = helper.window; ++ window->show(); ++ QVERIFY(QTest::qWaitForWindowExposed(window)); ++ ++ auto *listView = window->property("listView").value<QQuickListView *>(); ++ QVERIFY(listView); ++ const auto delegateModel = QQuickItemViewPrivate::get(listView)->model; ++ QTRY_COMPARE(listView->count(), 1); ++} ++ + QTEST_MAIN(tst_QQmlDelegateModel) + diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-130767.patch b/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-130767.patch new file mode 100644 index 000000000000..aefc46bd3604 --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-6.8.0-QTBUG-130767.patch @@ -0,0 +1,255 @@ +https://bugreports.qt.io/browse/QTBUG-130767 +https://bugs.kde.org/show_bug.cgi?id=494804 +https://codereview.qt-project.org/c/qt/qtdeclarative/+/604180 +(+required https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=104b0d6e88) +--- a/src/qml/jsruntime/qv4qobjectwrapper_p.h ++++ b/src/qml/jsruntime/qv4qobjectwrapper_p.h +@@ -224,2 +224,15 @@ + ++// We generally musn't pass ReturnedValue as arguments to other functions. ++// In this case, we do it solely for marking purposes so it's fine. ++inline void markIfPastMarkWeakValues(ExecutionEngine *engine, ReturnedValue rv) ++{ ++ const auto gcState = engine->memoryManager->gcStateMachine->state; ++ if (gcState != GCStateMachine::Invalid && gcState >= GCState::MarkWeakValues) { ++ QV4::WriteBarrier::markCustom(engine, [rv](QV4::MarkStack *ms) { ++ auto *m = StaticValue::fromReturnedValue(rv).m(); ++ m->mark(ms); ++ }); ++ } ++} ++ + inline ReturnedValue QObjectWrapper::wrap(ExecutionEngine *engine, QObject *object) +@@ -235,3 +248,5 @@ + +- return wrap_slowPath(engine, object); ++ const auto rv = wrap_slowPath(engine, object); ++ markIfPastMarkWeakValues(engine, rv); ++ return rv; + } +@@ -244,3 +259,5 @@ + +- return wrapConst_slowPath(engine, object); ++ const auto rv = wrapConst_slowPath(engine, object); ++ markIfPastMarkWeakValues(engine, rv); ++ return rv; + } +--- a/src/qml/memory/qv4mm.cpp ++++ b/src/qml/memory/qv4mm.cpp +@@ -62,2 +62,4 @@ + Q_DECLARE_LOGGING_CATEGORY(lcGcAllocatorStats) ++Q_LOGGING_CATEGORY(lcGcStateTransitions, "qt.qml.gc.stateTransitions") ++Q_DECLARE_LOGGING_CATEGORY(lcGcStateTransitions) + +@@ -682,3 +684,3 @@ + that->mm->engine->isGCOngoing = true; +- return MarkGlobalObject; ++ return GCState::MarkGlobalObject; + } +@@ -688,3 +690,3 @@ + that->mm->engine->markObjects(that->mm->m_markStack.get()); +- return MarkJSStack; ++ return GCState::MarkJSStack; + } +@@ -694,3 +696,3 @@ + that->mm->collectFromJSStack(that->mm->markStack()); +- return InitMarkPersistentValues; ++ return GCState::InitMarkPersistentValues; + } +@@ -700,5 +702,5 @@ + if (!that->mm->m_persistentValues) +- return InitMarkWeakValues; // no persistent values to mark ++ return GCState::InitMarkWeakValues; // no persistent values to mark + stateData = GCIteratorStorage { that->mm->m_persistentValues->begin() }; +- return MarkPersistentValues; ++ return GCState::MarkPersistentValues; + } +@@ -719,3 +721,3 @@ + if (wasDrainNecessary(markStack, that->deadline) && that->deadline.hasExpired()) +- return MarkPersistentValues; ++ return GCState::MarkPersistentValues; + PersistentValueStorage::Iterator& it = get<GCIteratorStorage>(stateData).it; +@@ -724,3 +726,3 @@ + if (!it.p) +- return InitMarkWeakValues; ++ return GCState::InitMarkWeakValues; + if (Managed *m = (*it).as<Managed>()) +@@ -729,3 +731,3 @@ + } +- return MarkPersistentValues; ++ return GCState::MarkPersistentValues; + } +@@ -735,3 +737,3 @@ + stateData = GCIteratorStorage { that->mm->m_weakValues->begin() }; +- return MarkWeakValues; ++ return GCState::MarkWeakValues; + } +@@ -742,3 +744,3 @@ + if (wasDrainNecessary(markStack, that->deadline) && that->deadline.hasExpired()) +- return MarkWeakValues; ++ return GCState::MarkWeakValues; + PersistentValueStorage::Iterator& it = get<GCIteratorStorage>(stateData).it; +@@ -747,3 +749,3 @@ + if (!it.p) +- return MarkDrain; ++ return GCState::MarkDrain; + QObjectWrapper *qobjectWrapper = (*it).as<QObjectWrapper>(); +@@ -768,3 +770,3 @@ + } +- return MarkWeakValues; ++ return GCState::MarkWeakValues; + } +@@ -775,3 +777,3 @@ + that->mm->markStack()->drain(); +- return MarkReady; ++ return GCState::MarkReady; + } +@@ -779,4 +781,4 @@ + return drainState == MarkStack::DrainState::Complete +- ? MarkReady +- : MarkDrain; ++ ? GCState::MarkReady ++ : GCState::MarkDrain; + } +@@ -786,3 +788,3 @@ + //Possibility to do some clean up, stat printing, etc... +- return InitCallDestroyObjects; ++ return GCState::InitCallDestroyObjects; + } +@@ -803,5 +805,5 @@ + if (!that->mm->m_weakValues) +- return FreeWeakMaps; // no need to call destroy objects ++ return GCState::FreeWeakMaps; // no need to call destroy objects + stateData = GCIteratorStorage { that->mm->m_weakValues->begin() }; +- return CallDestroyObjects; ++ return GCState::CallDestroyObjects; + } +@@ -818,3 +820,3 @@ + if (!it.p) +- return FreeWeakMaps; ++ return GCState::FreeWeakMaps; + Managed *m = (*it).managed(); +@@ -828,3 +830,3 @@ + } +- return CallDestroyObjects; ++ return GCState::CallDestroyObjects; + } +@@ -845,3 +847,3 @@ + freeWeakMaps(that->mm); +- return FreeWeakSets; ++ return GCState::FreeWeakSets; + } +@@ -863,3 +865,3 @@ + freeWeakSets(that->mm); +- return HandleQObjectWrappers; ++ return GCState::HandleQObjectWrappers; + } +@@ -869,3 +871,3 @@ + that->mm->cleanupDeletedQObjectWrappersInSweep(); +- return DoSweep; ++ return GCState::DoSweep; + } +@@ -893,3 +895,3 @@ + +- return Invalid; ++ return GCState::Invalid; + } +@@ -1493,4 +1495,8 @@ + } ++ qCDebug(lcGcStateTransitions) << "Preparing to execute the" ++ << QMetaEnum::fromType<GCState>().key(state) << "state"; + GCStateInfo& stateInfo = stateInfoMap[int(state)]; + state = stateInfo.execute(this, stateData); ++ qCDebug(lcGcStateTransitions) << "Transitioning to the" ++ << QMetaEnum::fromType<GCState>().key(state) << "state"; + if (stateInfo.breakAfter) +@@ -1507,4 +1513,8 @@ + while (state != GCState::Invalid) { ++ qCDebug(lcGcStateTransitions) << "Preparing to execute the" ++ << QMetaEnum::fromType<GCState>().key(state) << "state"; + GCStateInfo& stateInfo = stateInfoMap[int(state)]; + state = stateInfo.execute(this, stateData); ++ qCDebug(lcGcStateTransitions) << "Transitioning to the" ++ << QMetaEnum::fromType<GCState>().key(state) << "state"; + } +@@ -1516 +1526,3 @@ + QT_END_NAMESPACE ++ ++#include "moc_qv4mm_p.cpp" +--- a/src/qml/memory/qv4mm_p.h ++++ b/src/qml/memory/qv4mm_p.h +@@ -30,22 +30,2 @@ + +-enum GCState { +- MarkStart = 0, +- MarkGlobalObject, +- MarkJSStack, +- InitMarkPersistentValues, +- MarkPersistentValues, +- InitMarkWeakValues, +- MarkWeakValues, +- MarkDrain, +- MarkReady, +- InitCallDestroyObjects, +- CallDestroyObjects, +- FreeWeakMaps, +- FreeWeakSets, +- HandleQObjectWrappers, +- DoSweep, +- Invalid, +- Count, +-}; +- + struct GCData { virtual ~GCData(){};}; +@@ -55,11 +35,39 @@ + }; +-struct GCStateMachine; +- +-struct GCStateInfo { +- using ExtraData = std::variant<std::monostate, GCIteratorStorage>; +- GCState (*execute)(GCStateMachine *, ExtraData &) = nullptr; // Function to execute for this state, returns true if ready to transition +- bool breakAfter{false}; +-}; + + struct GCStateMachine { ++ Q_GADGET_EXPORT(Q_QML_EXPORT) ++ ++public: ++ enum GCState { ++ MarkStart = 0, ++ MarkGlobalObject, ++ MarkJSStack, ++ InitMarkPersistentValues, ++ MarkPersistentValues, ++ InitMarkWeakValues, ++ MarkWeakValues, ++ MarkDrain, ++ MarkReady, ++ InitCallDestroyObjects, ++ CallDestroyObjects, ++ FreeWeakMaps, ++ FreeWeakSets, ++ HandleQObjectWrappers, ++ DoSweep, ++ Invalid, ++ Count, ++ }; ++ Q_ENUM(GCState) ++ ++ struct StepTiming { ++ qint64 rolling_sum = 0; ++ qint64 count = 0; ++ }; ++ ++ struct GCStateInfo { ++ using ExtraData = std::variant<std::monostate, GCIteratorStorage>; ++ GCState (*execute)(GCStateMachine *, ExtraData &) = nullptr; // Function to execute for this state, returns true if ready to transition ++ bool breakAfter{false}; ++ }; ++ + using ExtraData = GCStateInfo::ExtraData; +@@ -96,2 +104,4 @@ + ++using GCState = GCStateMachine::GCState; ++using GCStateInfo = GCStateMachine::GCStateInfo; + diff --git a/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r5.ebuild b/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r7.ebuild index 3dcd70472b17..21baad2c9b84 100644 --- a/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r5.ebuild +++ b/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r7.ebuild @@ -35,10 +35,11 @@ BDEPEND=" " PATCHES=( - "${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch "${FILESDIR}"/${PN}-6.7.3-QTBUG-129622.patch + "${FILESDIR}"/${PN}-6.8.0-QTBUG-125053.patch "${FILESDIR}"/${PN}-6.8.0-QTBUG-129797.patch "${FILESDIR}"/${PN}-6.8.0-QTBUG-129500.patch + "${FILESDIR}"/${PN}-6.8.0-QTBUG-130767.patch ) src_configure() { |