Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kitemmodels for openSUSE:Factory checked in at 2022-02-24 18:19:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old) and /work/SRC/openSUSE:Factory/.kitemmodels.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels" Thu Feb 24 18:19:41 2022 rev:100 rq:954261 version:5.91.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes 2022-01-11 21:19:10.860955088 +0100 +++ /work/SRC/openSUSE:Factory/.kitemmodels.new.1958/kitemmodels.changes 2022-02-24 18:21:56.314682583 +0100 @@ -1,0 +2,13 @@ +Sun Feb 6 10:17:04 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.91.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.91.0 +- Changes since 5.90.0: + * Rework removeParentMappings() to not rely on stable QHash iterators + * Don't cache end iterator when modifying the container + * Fix KSortFilterProxyModel QML unit test with Qt6 + * Add CI qt6 support + +------------------------------------------------------------------- Old: ---- kitemmodels-5.90.0.tar.xz kitemmodels-5.90.0.tar.xz.sig New: ---- kitemmodels-5.91.0.tar.xz kitemmodels-5.91.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitemmodels.spec ++++++ --- /var/tmp/diff_new_pack.uoj59L/_old 2022-02-24 18:21:56.846682441 +0100 +++ /var/tmp/diff_new_pack.uoj59L/_new 2022-02-24 18:21:56.850682440 +0100 @@ -17,7 +17,7 @@ %define lname libKF5ItemModels5 -%define _tar_path 5.90 +%define _tar_path 5.91 # Full KF5 version (e.g. 5.33.0) %{!?_kf5_version: %global _kf5_version %{version}} # Last major and minor KF5 version (e.g. 5.33) @@ -26,7 +26,7 @@ # Only needed for the package signature condition %bcond_without released Name: kitemmodels -Version: 5.90.0 +Version: 5.91.0 Release: 0 Summary: Set of item models extending the Qt model-view framework License: LGPL-2.1-or-later ++++++ kitemmodels-5.90.0.tar.xz -> kitemmodels-5.91.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.90.0/.gitlab-ci.yml new/kitemmodels-5.91.0/.gitlab-ci.yml --- old/kitemmodels-5.90.0/.gitlab-ci.yml 2022-01-01 13:16:35.000000000 +0100 +++ new/kitemmodels-5.91.0/.gitlab-ci.yml 2022-02-05 16:14:55.000000000 +0100 @@ -5,3 +5,4 @@ - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/freebsd.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.90.0/CMakeLists.txt new/kitemmodels-5.91.0/CMakeLists.txt --- old/kitemmodels-5.90.0/CMakeLists.txt 2022-01-01 13:16:35.000000000 +0100 +++ new/kitemmodels-5.91.0/CMakeLists.txt 2022-02-05 16:14:55.000000000 +0100 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.90.0") # handled by release scripts +set(KF_VERSION "5.91.0") # handled by release scripts project(KItemModels VERSION ${KF_VERSION}) include(FeatureSummary) -find_package(ECM 5.90.0 NO_MODULE) +find_package(ECM 5.91.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) @@ -80,7 +80,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kitemmodels_version.h - DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF} COMPONENT Devel + DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/KItemModels COMPONENT Devel ) feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.90.0/autotests/ksortfilterproxymodel_qml.cpp new/kitemmodels-5.91.0/autotests/ksortfilterproxymodel_qml.cpp --- old/kitemmodels-5.90.0/autotests/ksortfilterproxymodel_qml.cpp 2022-01-01 13:16:35.000000000 +0100 +++ new/kitemmodels-5.91.0/autotests/ksortfilterproxymodel_qml.cpp 2022-02-05 16:14:55.000000000 +0100 @@ -159,13 +159,17 @@ app.rootContext()->setContextProperty("testModel", createMonthTestModel(&app)); - app.loadData( + auto qmlSrc = QByteArray( "import QtQml 2.0\n" "import org.kde.kitemmodels 1.0\n" "KSortFilterProxyModel {\n" " sourceModel: testModel\n" - " filterRegExp: /Ma.*/\n" + " filterRegularExpression: /Ma.*/\n" "}\n"); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + qmlSrc.replace("filterRegularExpression", "filterRegExp"); +#endif + app.loadData(qmlSrc); QCOMPARE(app.rootObjects().count(), 1); auto filterModel = qobject_cast<QAbstractItemModel *>(app.rootObjects().first()); @@ -182,14 +186,18 @@ app.rootContext()->setContextProperty("testModel", createMonthTestModel(&app)); - app.loadData( + auto qmlSrc = QByteArray( "import QtQml 2.0\n" "import org.kde.kitemmodels 1.0\n" "KSortFilterProxyModel {\n" " sourceModel: testModel\n" " filterRole: \"user\"\n" - " filterRegExp: /1[0-9]/\n" // month value is 10 or more + " filterRegularExpression: /1[0-9]/\n" // month value is 10 or more "}\n"); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + qmlSrc.replace("filterRegularExpression", "filterRegExp"); +#endif + app.loadData(qmlSrc); QCOMPARE(app.rootObjects().count(), 1); auto filterModel = qobject_cast<QAbstractItemModel *>(app.rootObjects().first()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.90.0/src/core/kselectionproxymodel.cpp new/kitemmodels-5.91.0/src/core/kselectionproxymodel.cpp --- old/kitemmodels-5.90.0/src/core/kselectionproxymodel.cpp 2022-01-01 13:16:35.000000000 +0100 +++ new/kitemmodels-5.91.0/src/core/kselectionproxymodel.cpp 2022-02-05 16:14:55.000000000 +0100 @@ -275,8 +275,7 @@ } it = selection.begin(); - const QList<QItemSelectionRange>::iterator end = selection.end(); - while (it != end) { + while (it != selection.end()) { const QItemSelectionRange range = *it; it = selection.erase(it); @@ -1639,32 +1638,32 @@ Q_ASSERT(parent.isValid() ? parent.model() == q : true); - SourceProxyIndexMapping::right_iterator it = m_mappedParents.rightBegin(); - SourceProxyIndexMapping::right_iterator endIt = m_mappedParents.rightEnd(); - - const bool flatList = isFlat(); - - while (it != endIt) { + // collect all removals first, as executing them recursively will invalidate our iterators + struct RemovalInfo { + QPersistentModelIndex idx; + QModelIndex sourceIdx; + }; + std::vector<RemovalInfo> removals; + removals.reserve(end - start + 1); + for (auto it = m_mappedParents.rightBegin(); it != m_mappedParents.rightEnd(); ++it) { if (it.key().row() >= start && it.key().row() <= end) { const QModelIndex sourceParent = it.value(); const QModelIndex proxyGrandParent = mapParentFromSource(sourceParent.parent()); if (proxyGrandParent == parent) { - if (!flatList) - // Due to recursive calls, we could have several iterators on the container - // when erase is called. That's safe according to the QHash::iterator docs though. - { - removeParentMappings(it.key(), 0, q->sourceModel()->rowCount(it.value()) - 1); - } - - m_parentIds.removeRight(it.key()); - it = m_mappedParents.eraseRight(it); - } else { - ++it; + removals.push_back({it.key(), it.value()}); } - } else { - ++it; } } + + // execute the removals + const bool flatList = isFlat(); + for (const auto &r : removals) { + if (!flatList) { + removeParentMappings(r.idx, 0, q->sourceModel()->rowCount(r.sourceIdx) - 1); + } + m_parentIds.removeRight(r.idx); + m_mappedParents.removeRight(r.idx); + } } QModelIndex KSelectionProxyModelPrivate::mapTopLevelToSource(int row, int column) const