diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-10-09 04:26:33 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-10-09 04:26:33 +0100 |
commit | 6ee17dd82a3bcd0e90af4ebfbb3e411d342761be (patch) | |
tree | 5ade54018efa76614b79d832bbe15a22021b6d8c /dev-qt/qtdeclarative | |
parent | 325837835fc86686829aaa6acace3d3c06c74cea (diff) |
gentoo auto-resync : 09:10:2024 - 04:26:32
Diffstat (limited to 'dev-qt/qtdeclarative')
-rw-r--r-- | dev-qt/qtdeclarative/Manifest | 7 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-125053.patch | 259 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/qtdeclarative-6.7.3-r2.ebuild (renamed from dev-qt/qtdeclarative/qtdeclarative-6.7.3-r1.ebuild) | 4 | ||||
-rw-r--r-- | dev-qt/qtdeclarative/qtdeclarative-6.8.0-r2.ebuild (renamed from dev-qt/qtdeclarative/qtdeclarative-6.8.0_rc.ebuild) | 18 |
4 files changed, 285 insertions, 3 deletions
diff --git a/dev-qt/qtdeclarative/Manifest b/dev-qt/qtdeclarative/Manifest index 0c0e4df276f0..058e5b1d9f80 100644 --- a/dev-qt/qtdeclarative/Manifest +++ b/dev-qt/qtdeclarative/Manifest @@ -1,14 +1,15 @@ AUX qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch 1566 BLAKE2B b6436c9be0a7de092635e1fc3999c3142fc3e916cbcc69f472691bbd559f611b4d5741f3627c47162a5ac86126382507add72a25a121235e856b1de802ee19be SHA512 dd5193f8d8a051238dabf63306cc77e3a5696fc12241c27f35cadfd30763ddfeb2af7d640849dcc7a810b7087173b8e9af17341ea1b68440906f2c2f1f96fee3 +AUX qtdeclarative-6.7.3-QTBUG-125053.patch 9583 BLAKE2B d7bdfe4d0a002e5d17f57604dbece3294596a76d03bc3c12a05622d2c95a16bde4bb128d19c63e4856270a875c5b6b866c9cfed9f30a346b441a2b81e7cdf2d1 SHA512 3811879d972ff5a0dbfca98c2c2931f50dd9906dc0ecf75f13e59eae71d9d27dfc9279ba9952a00be81cab83e8f8e42e798d9b43d7d3d6974a1676f4e8e401ea 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 DIST qtdeclarative-everywhere-src-6.7.3.tar.xz 35663596 BLAKE2B b9dc18b4a459c283883a9bd2b2708ea758dc2853e93af05a503b84cb348398e5cdd9b28f6735cbf8e480d252f33cf6c36b06deedd468e7b0169e59b5bae296cd SHA512 54e9b262b07c80eb6530da3e980319edd7370cc90f4241ebaf22a73e1f7f4f14177cea06276a0d3b2b553c6ed0825be0c56b9e2ddca53e99db57b67c3ad4bb47 -DIST qtdeclarative-everywhere-src-6.8.0-rc.tar.xz 37028956 BLAKE2B 6847f597744ccadc04e0cbb68c93aa84ed4315fce60e17bc4b7268d223845c009ec9c9b7bd3a276c4334583dfb72f54308456ae3bdee1ea23b5230e62fbffc73 SHA512 148b8ef1f9edd7e0b11f7b0b2e8741e4daab688431869f3e7d3152179659b18a4a66547f360595e6172becb728c81ecbe8844d1a38b01c95d8572f037c0ada8b +DIST qtdeclarative-everywhere-src-6.8.0.tar.xz 37029068 BLAKE2B 272c673eb06ad28be3f7a02d29323ba0ab1943e1dabeb8a8b7d8f4857473a488f22bce1ee60c1e56996cd6805cb30f77b80253a6504f86252c0d4188984ff4b2 SHA512 4f1e26511265e7085bfe097435e64b4daa0bb4a8287f56753a64437a5eb408c0679afa03e255d1949e382b59496eff600cb0638a9b8cc95278d67ad5cfb9d52b 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-r1.ebuild 1739 BLAKE2B 434181ff4ee1fcb2d11b034c977b73bc23225cfe44d0ac5ee048620e2940fb0273c682defe6247d90a1052ad935e418c8c81881a5378d8f5b5f466a147f42120 SHA512 057e76f4969535d8437cbc02e8999aa70656e8256e95ba1e20f3a1bcab34a1bef0fe80812799eb608f3c9c0cb18eb06ad0a3ca04e7e6537997f81ff0136ddd35 +EBUILD qtdeclarative-6.7.3-r2.ebuild 1798 BLAKE2B e08a04183d4de74c334058ed703c786ea1f82068707c80f1d009433fba9da289fd94759ba5c537a96d2cee8ebc838c9e2fdebda53246231cb80f4def98ac1a54 SHA512 7717d74451e24072b2fba8737a8ce4e546c3d600209d9d30e6277f3cc60f255a4306120084a21be63d817dc44e4e4866849bfa1128421985d4ca292a7b5ac180 EBUILD qtdeclarative-6.7.9999.ebuild 1739 BLAKE2B 434181ff4ee1fcb2d11b034c977b73bc23225cfe44d0ac5ee048620e2940fb0273c682defe6247d90a1052ad935e418c8c81881a5378d8f5b5f466a147f42120 SHA512 057e76f4969535d8437cbc02e8999aa70656e8256e95ba1e20f3a1bcab34a1bef0fe80812799eb608f3c9c0cb18eb06ad0a3ca04e7e6537997f81ff0136ddd35 -EBUILD qtdeclarative-6.8.0_rc.ebuild 1181 BLAKE2B c4bc298049c05c12f5d32f2ed71a6f2de406c09a76bf1f57b39b5b2d7fc4534b3233c80c8662aa93ed3fcac9f5fb06b0af97edb5f68005b28af4a71676fdc2ba SHA512 7f4073b2ca77daebcc41e9e72cb3a1b2a54e67160df86543904b3d35c90eb8477e4b8c364233815d084d855565ebaada290930855f0bf2ce5ae632f9b5bd6f90 +EBUILD qtdeclarative-6.8.0-r2.ebuild 1798 BLAKE2B e08a04183d4de74c334058ed703c786ea1f82068707c80f1d009433fba9da289fd94759ba5c537a96d2cee8ebc838c9e2fdebda53246231cb80f4def98ac1a54 SHA512 7717d74451e24072b2fba8737a8ce4e546c3d600209d9d30e6277f3cc60f255a4306120084a21be63d817dc44e4e4866849bfa1128421985d4ca292a7b5ac180 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.7.3-QTBUG-125053.patch b/dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-125053.patch new file mode 100644 index 000000000000..c1aa74599923 --- /dev/null +++ b/dev-qt/qtdeclarative/files/qtdeclarative-6.7.3-QTBUG-125053.patch @@ -0,0 +1,259 @@ +https://bugreports.qt.io/browse/QTBUG-125053 +https://bugreports.qt.io/browse/QTBUG-127340 +https://codereview.qt-project.org/c/qt/qtdeclarative/+/593122 +--- 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> + +@@ -168,5 +170,4 @@ + , m_incubatorCleanupScheduled(false) + , m_waitingToFetchMore(false) +- , m_maybeResetRoleNames(false) + , m_cacheItems(nullptr) + , m_items(nullptr) +@@ -373,6 +374,4 @@ + qmlobject_connect(aim, QAbstractItemModel, SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), + q, QQmlDelegateModel, SLOT(_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); +- QObject::connect(aim, &QAbstractItemModel::modelReset, q, &QQmlDelegateModel::handleModelReset); +- QObject::connect(aim, &QAbstractItemModel::layoutChanged, q, &QQmlDelegateModel::_q_layoutChanged); + } + +@@ -404,6 +403,4 @@ + QObject::disconnect(aim, SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), + q, SLOT(_q_layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); +- QObject::disconnect(aim, &QAbstractItemModel::modelReset, q, &QQmlDelegateModel::handleModelReset); +- QObject::disconnect(aim, &QAbstractItemModel::layoutChanged, q, &QQmlDelegateModel::_q_layoutChanged); + } + +@@ -429,4 +426,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); ++ } + } + +@@ -1915,26 +1927,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); + } + +@@ -1946,21 +1955,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/qtdeclarative-6.7.3-r1.ebuild b/dev-qt/qtdeclarative/qtdeclarative-6.7.3-r2.ebuild index 724f992b0453..749123d1c04f 100644 --- a/dev-qt/qtdeclarative/qtdeclarative-6.7.3-r1.ebuild +++ b/dev-qt/qtdeclarative/qtdeclarative-6.7.3-r2.ebuild @@ -33,6 +33,10 @@ BDEPEND=" ~dev-qt/qtshadertools-${PV}:6 " +PATCHES=( + "${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch +) + src_configure() { local mycmakeargs=( $(cmake_use_find_package qmlls Qt6LanguageServerPrivate) diff --git a/dev-qt/qtdeclarative/qtdeclarative-6.8.0_rc.ebuild b/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r2.ebuild index 347c469cee90..749123d1c04f 100644 --- a/dev-qt/qtdeclarative/qtdeclarative-6.8.0_rc.ebuild +++ b/dev-qt/qtdeclarative/qtdeclarative-6.8.0-r2.ebuild @@ -33,6 +33,10 @@ BDEPEND=" ~dev-qt/qtshadertools-${PV}:6 " +PATCHES=( + "${FILESDIR}"/${PN}-6.7.3-QTBUG-125053.patch +) + src_configure() { local mycmakeargs=( $(cmake_use_find_package qmlls Qt6LanguageServerPrivate) @@ -45,3 +49,17 @@ src_configure() { qt6-build_src_configure } + +src_install() { + qt6-build_src_install + + if [[ ! -e ${D}${QT6_LIBDIR}/libQt6QuickControls2.so.6 ]]; then #940675 + eerror "${CATEGORY}/${PF} seems to have been improperly built and" + eerror "install was aborted to protect the system. Possibly(?) due" + eerror "to a rare portage ordering bug. If using portage, try:" + eerror " emerge -1 qtshadertools:6 qtdeclarative:6" + eerror "If that did not resolve the issue, please provide build.log" + eerror "on https://bugs.gentoo.org/940675" + die "aborting due to incomplete/broken build (see above)" + fi +} |