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-05-16 18:07:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old) and /work/SRC/openSUSE:Factory/.kitemmodels.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels" Mon May 16 18:07:01 2022 rev:103 rq:977182 version:5.94.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes 2022-04-11 23:48:41.583447870 +0200 +++ /work/SRC/openSUSE:Factory/.kitemmodels.new.1538/kitemmodels.changes 2022-05-16 18:08:53.313295142 +0200 @@ -1,0 +2,14 @@ +Tue May 10 08:18:01 UTC 2022 - Christophe Giboudeaux <christo...@krop.fr> + +- Update to 5.94.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.94.0 +- Changes since 5.93.0: + * Fix assertions in KDescendantsProxyModel (kde#452043) + * Clean up proxymodeltestapp CMakeLists.txt + * Clean up optional dependencies for tests + * Add windows CI + * Fix punctuation/whitespace of runtime rate-limited deprecation warnings + +------------------------------------------------------------------- Old: ---- kitemmodels-5.93.0.tar.xz kitemmodels-5.93.0.tar.xz.sig New: ---- kitemmodels-5.94.0.tar.xz kitemmodels-5.94.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitemmodels.spec ++++++ --- /var/tmp/diff_new_pack.iqWOXR/_old 2022-05-16 18:08:53.941295736 +0200 +++ /var/tmp/diff_new_pack.iqWOXR/_new 2022-05-16 18:08:53.949295744 +0200 @@ -17,7 +17,7 @@ %define lname libKF5ItemModels5 -%define _tar_path 5.93 +%define _tar_path 5.94 # 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.93.0 +Version: 5.94.0 Release: 0 Summary: Set of item models extending the Qt model-view framework License: LGPL-2.1-or-later ++++++ kitemmodels-5.93.0.tar.xz -> kitemmodels-5.94.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/.gitlab-ci.yml new/kitemmodels-5.94.0/.gitlab-ci.yml --- old/kitemmodels-5.93.0/.gitlab-ci.yml 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/.gitlab-ci.yml 2022-04-19 01:29:02.000000000 +0200 @@ -7,3 +7,4 @@ - 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 - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android-qt6.yml + - https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/windows.yml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/CMakeLists.txt new/kitemmodels-5.94.0/CMakeLists.txt --- old/kitemmodels-5.93.0/CMakeLists.txt 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/CMakeLists.txt 2022-04-19 01:29:02.000000000 +0200 @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.93.0") # handled by release scripts +set(KF_VERSION "5.94.0") # handled by release scripts project(KItemModels VERSION ${KF_VERSION}) include(FeatureSummary) @@ -27,6 +27,7 @@ PURPOSE "Build QML import for KItemModels" ) + include(ECMSetupVersion) include(ECMGenerateHeaders) include(ECMAddQch) @@ -44,6 +45,17 @@ add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02) add_subdirectory(src) if (BUILD_TESTING) + find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test Widgets) + find_package(Qt${QT_MAJOR_VERSION}QuickWidgets ${REQUIRED_QT_VERSION} NO_MODULE) + set_package_properties(Qt${QT_MAJOR_VERSION}QuickWidgets PROPERTIES + TYPE OPTIONAL + PURPOSE "Build proxymodeltestapp QML selection and QML treeview examples" + ) + set_package_properties(Qt${QT_MAJOR_VERSION}Script PROPERTIES + TYPE OPTIONAL + PURPOSE "Build proxymodeltestapp reparenting example" + ) + find_package(Qt${QT_MAJOR_VERSION}Script ${REQUIRED_QT_VERSION} NO_MODULE) add_subdirectory(autotests) add_subdirectory(tests) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/autotests/CMakeLists.txt new/kitemmodels-5.94.0/autotests/CMakeLists.txt --- old/kitemmodels-5.93.0/autotests/CMakeLists.txt 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/autotests/CMakeLists.txt 2022-04-19 01:29:02.000000000 +0200 @@ -8,8 +8,6 @@ remove_definitions(-DQT_NO_CAST_FROM_ASCII) remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) -find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test Widgets) - add_subdirectory(proxymodeltestsuite) add_subdirectory(bihash) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/autotests/kdescendantsproxymodeltest.cpp new/kitemmodels-5.94.0/autotests/kdescendantsproxymodeltest.cpp --- old/kitemmodels-5.93.0/autotests/kdescendantsproxymodeltest.cpp 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/autotests/kdescendantsproxymodeltest.cpp 2022-04-19 01:29:02.000000000 +0200 @@ -20,13 +20,14 @@ QString label; Node *parent = nullptr; QList<Node *> children; + int knownChildren = 0; }; class SimpleObjectModel : public QAbstractListModel { Q_OBJECT public: - explicit SimpleObjectModel(QObject *parent = nullptr); + explicit SimpleObjectModel(QObject *parent = nullptr, bool incremental = false); ~SimpleObjectModel() override; QModelIndex index(int, int, const QModelIndex &parent = QModelIndex()) const override; @@ -39,12 +40,20 @@ bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override; bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationRow) override; + Node *getRootNode() const + { + return m_root; + } + private: Node *m_root; + // simulate a model that loads in new rows with fetchMore() + bool m_incremental; }; -SimpleObjectModel::SimpleObjectModel(QObject *parent) +SimpleObjectModel::SimpleObjectModel(QObject *parent, bool incremental) : QAbstractListModel(parent) + , m_incremental(incremental) { m_root = new Node; } @@ -99,6 +108,9 @@ item = m_root; } + if (m_incremental) { + return item->knownChildren; + } return item->children.count(); } @@ -254,6 +266,7 @@ } return model; } + private Q_SLOTS: void testResetModelContent(); void testChangeSeparator(); @@ -265,6 +278,8 @@ void testRemoveInCollapsedModel(); void testMoveInsideCollapsed(); void testExpandInsideCollapsed(); + void testEmptyModel(); + void testEmptyChild(); }; /// Tests that replacing the source model results in data getting changed @@ -653,6 +668,38 @@ QCOMPARE(proxy.rowCount(), 5); } +void tst_KDescendantProxyModel::testEmptyModel() +{ + SimpleObjectModel *model = new SimpleObjectModel(this, true); + model->insert(QModelIndex(), 0, QStringLiteral("Row0")); + model->insert(QModelIndex(), 0, QStringLiteral("Row1")); + KDescendantsProxyModel proxy; + proxy.setSourceModel(model); + QCOMPARE(proxy.rowCount(), 0); +} + +void tst_KDescendantProxyModel::testEmptyChild() +{ + SimpleObjectModel *model = new SimpleObjectModel(this, true); + model->insert(QModelIndex(), 0, QStringLiteral("Row0")); + auto parentIndex = model->index(0, 0, QModelIndex()); + model->insert(parentIndex, 0, QStringLiteral("Row0-0")); + model->insert(parentIndex, 0, QStringLiteral("Row0-1")); + model->insert(QModelIndex(), 0, QStringLiteral("Row1")); + + // simulate that the row count for the root node is known because it was listed + model->getRootNode()->knownChildren = 2; + + KDescendantsProxyModel proxy; + proxy.setSourceModel(model); + proxy.setExpandsByDefault(false); + QCOMPARE(proxy.rowCount(), 2); + + // remove the row that has children but a rowCount of 0 + model->removeRows(0, 1, QModelIndex()); + QCOMPARE(proxy.rowCount(), 1); +} + QTEST_MAIN(tst_KDescendantProxyModel) #include "kdescendantsproxymodeltest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/src/core/kdescendantsproxymodel.cpp new/kitemmodels-5.94.0/src/core/kdescendantsproxymodel.cpp --- old/kitemmodels-5.93.0/src/core/kdescendantsproxymodel.cpp 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/src/core/kdescendantsproxymodel.cpp 2022-04-19 01:29:02.000000000 +0200 @@ -128,7 +128,7 @@ const int rowCount = q->sourceModel()->rowCount(sourceParent); - // A node can be marked as collapsed or expanded even if it doesn'0t have children + // A node can be marked as collapsed or expanded even if it doesn't have children if (rowCount == 0) { it = m_pendingParents.erase(it); continue; @@ -161,11 +161,8 @@ const QModelIndex child = q->sourceModel()->index(sourceRow, column, sourceParent); Q_ASSERT(child.isValid()); - if (q->sourceModel()->hasChildren(child)) { - Q_ASSERT(q->sourceModel()->rowCount(child) > 0); - if (q->isSourceIndexExpanded(child)) { - newPendingParents.append(child); - } + if (q->sourceModel()->hasChildren(child) && q->isSourceIndexExpanded(child) && q->sourceModel()->rowCount(child) > 0) { + newPendingParents.append(child); } } } @@ -500,7 +497,6 @@ } if (d->m_mapping.isEmpty() && sourceModel()->hasChildren()) { - Q_ASSERT(sourceModel()->rowCount() > 0); const_cast<KDescendantsProxyModelPrivate *>(d)->synchronousMappingRefresh(); } return d->m_rowCount; @@ -765,8 +761,7 @@ Q_ASSERT(rowCount == start); static const int column = 0; QModelIndex idx = q->sourceModel()->index(rowCount - 1, column, parent); - while (q->isSourceIndexExpanded(idx) && q->sourceModel()->hasChildren(idx)) { - Q_ASSERT(q->sourceModel()->rowCount(idx) > 0); + while (q->isSourceIndexExpanded(idx) && q->sourceModel()->hasChildren(idx) && q->sourceModel()->rowCount(idx) > 0) { idx = q->sourceModel()->index(q->sourceModel()->rowCount(idx) - 1, column, idx); } // The last item in the list is getting a sibling below it. @@ -894,8 +889,7 @@ const QModelIndex idx = q->sourceModel()->index(row, column, parent); Q_ASSERT(idx.isValid()); - if (q->isSourceIndexExpanded(idx) && q->sourceModel()->hasChildren(idx)) { - Q_ASSERT(q->sourceModel()->rowCount(idx) > 0); + if (q->isSourceIndexExpanded(idx) && q->sourceModel()->hasChildren(idx) && q->sourceModel()->rowCount(idx) > 0) { m_pendingParents.append(idx); } } @@ -928,8 +922,7 @@ static const int column = 0; QModelIndex idx = q->sourceModel()->index(end, column, parent); - while (q->sourceModel()->hasChildren(idx)) { - Q_ASSERT(q->sourceModel()->rowCount(idx) > 0); + while (q->sourceModel()->hasChildren(idx) && q->sourceModel()->rowCount(idx) > 0) { idx = q->sourceModel()->index(q->sourceModel()->rowCount(idx) - 1, column, idx); } const int proxyEnd = q->mapFromSource(idx).row(); @@ -1221,8 +1214,7 @@ { Q_Q(KDescendantsProxyModel); resetInternalData(); - if (q->sourceModel()->hasChildren()) { - Q_ASSERT(q->sourceModel()->rowCount() > 0); + if (q->sourceModel()->hasChildren() && q->sourceModel()->rowCount() > 0) { m_pendingParents.append(QModelIndex()); scheduleProcessPendingParents(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/src/qml/qmldeprecated.h new/kitemmodels-5.94.0/src/qml/qmldeprecated.h --- old/kitemmodels-5.93.0/src/qml/qmldeprecated.h 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/src/qml/qmldeprecated.h 2022-04-19 01:29:02.000000000 +0200 @@ -30,7 +30,7 @@ QMetaObject::invokeMethod( \ this, \ [this]() { \ - qCWarning(KITEMMODELS_LOGDEPRECATED) << item << "is deprecated (since" << since << "):" << message; \ + qCWarning(KITEMMODELS_LOGDEPRECATED).nospace() << item << " is deprecated (since " << since << "): " << message;\ const QString elidedName = QLatin1String("...") + qmlContext(this)->baseUrl().toString().right(80); \ qCWarning(KITEMMODELS_LOGDEPRECATED) << "Note: Instantiated from" << elidedName; \ }, \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/tests/CMakeLists.txt new/kitemmodels-5.94.0/tests/CMakeLists.txt --- old/kitemmodels-5.93.0/tests/CMakeLists.txt 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/tests/CMakeLists.txt 2022-04-19 01:29:02.000000000 +0200 @@ -1,22 +1,17 @@ remove_definitions(-DQT_NO_CAST_TO_ASCII) remove_definitions(-DQT_NO_CAST_FROM_ASCII) -if (TARGET Qt${QT_MAJOR_VERSION}::QuickWidgets) - add_subdirectory(proxymodeltestapp) -endif() -find_package(Qt${QT_MAJOR_VERSION}Widgets ${REQUIRED_QT_VERSION} CONFIG) -if (TARGET Qt${QT_MAJOR_VERSION}::Widgets) - macro(KITEMMODELS_WIDGETS_TESTS) - foreach(_testname ${ARGN}) - add_executable(${_testname} ${_testname}.cpp) - target_link_libraries(${_testname} - KF5::ItemModels - Qt${QT_MAJOR_VERSION}::Widgets) - ecm_mark_as_test(${_testname}) - endforeach() - endmacro(KITEMMODELS_WIDGETS_TESTS) +add_subdirectory(proxymodeltestapp) +macro(KITEMMODELS_WIDGETS_TESTS) + foreach(_testname ${ARGN}) + add_executable(${_testname} ${_testname}.cpp) + target_link_libraries(${_testname} + KF5::ItemModels + Qt${QT_MAJOR_VERSION}::Widgets) + ecm_mark_as_test(${_testname}) + endforeach() +endmacro(KITEMMODELS_WIDGETS_TESTS) - KITEMMODELS_WIDGETS_TESTS( - rearrangecolumns - ) -endif() +KITEMMODELS_WIDGETS_TESTS( + rearrangecolumns +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/tests/proxymodeltestapp/CMakeLists.txt new/kitemmodels-5.94.0/tests/proxymodeltestapp/CMakeLists.txt --- old/kitemmodels-5.93.0/tests/proxymodeltestapp/CMakeLists.txt 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/tests/proxymodeltestapp/CMakeLists.txt 2022-04-19 01:29:02.000000000 +0200 @@ -1,5 +1,6 @@ +add_executable(proxymodeltestapp) -set(proxymodeltestapp_SRCS +target_sources(proxymodeltestapp PRIVATE main.cpp mainwindow.cpp breadcrumbswidget.cpp @@ -16,41 +17,27 @@ lessthanwidget.cpp modelcommanderwidget.cpp matchcheckingwidget.cpp - descendantqmltree.cpp ) -find_package(Qt${QT_MAJOR_VERSION}Widgets ${REQUIRED_QT_VERSION} QUIET CONFIG) -find_package(Qt${QT_MAJOR_VERSION}Script ${REQUIRED_QT_VERSION} QUIET CONFIG) if (TARGET Qt5::Script) - list(APPEND proxymodeltestapp_SRCS + target_sources(proxymodeltestapp PRIVATE reparentingpmwidget.cpp scriptablereparentingwidget.cpp ) + target_link_libraries(proxymodeltestapp Qt${QT_MAJOR_VERSION}::Script) endif() -find_package(Qt${QT_MAJOR_VERSION}QuickWidgets ${REQUIRED_QT_VERSION} CONFIG) -if (Qt${QT_MAJOR_VERSION}QuickWidgets_FOUND AND NOT Qt${QT_MAJOR_VERSION}QuickWidgets_VERSION VERSION_LESS 5.5) - list(APPEND proxymodeltestapp_SRCS +if (TARGET Qt${QT_MAJOR_VERSION}::QuickWidgets) + target_sources(proxymodeltestapp PRIVATE selectioninqmlwidget.cpp + descendantqmltree.cpp ) - add_definitions(-DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}") + target_link_libraries(proxymodeltestapp Qt${QT_MAJOR_VERSION}::QuickWidgets) + target_compile_definitions(proxymodeltestapp PRIVATE -DSRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}") endif() -add_executable(proxymodeltestapp ${proxymodeltestapp_SRCS}) - target_link_libraries(proxymodeltestapp KF5::ItemModels proxymodeltestsuite Qt${QT_MAJOR_VERSION}::Widgets ) - -if (TARGET Qt5::Script) - target_link_libraries(proxymodeltestapp - Qt${QT_MAJOR_VERSION}::Script - ) -endif() -if (TARGET Qt${QT_MAJOR_VERSION}::QuickWidgets AND NOT Qt${QT_MAJOR_VERSION}QuickWidgets_VERSION VERSION_LESS 5.5) - target_link_libraries(proxymodeltestapp - Qt${QT_MAJOR_VERSION}::QuickWidgets - ) -endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.93.0/tests/proxymodeltestapp/mainwindow.cpp new/kitemmodels-5.94.0/tests/proxymodeltestapp/mainwindow.cpp --- old/kitemmodels-5.93.0/tests/proxymodeltestapp/mainwindow.cpp 2022-04-02 12:00:50.000000000 +0200 +++ new/kitemmodels-5.94.0/tests/proxymodeltestapp/mainwindow.cpp 2022-04-19 01:29:02.000000000 +0200 @@ -52,7 +52,9 @@ #ifdef QT_SCRIPT_LIB tabWidget->addTab(new ReparentingProxyModelWidget(), QStringLiteral("reparenting PM")); #endif +#ifdef QT_QUICKWIDGETS_LIB tabWidget->addTab(new DescendantQmlTreeWidget(), QStringLiteral("QML Trees")); +#endif tabWidget->addTab(new LessThanWidget(), QStringLiteral("Less Than")); tabWidget->addTab(new ProxyModelTestWidget(), QStringLiteral("Proxy Model Test")); // tabWidget->addTab(new StateSaverWidget(), "State Saver Test");