Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kitemmodels for openSUSE:Factory checked in at 2021-09-16 23:14:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old) and /work/SRC/openSUSE:Factory/.kitemmodels.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kitemmodels" Thu Sep 16 23:14:04 2021 rev:95 rq:919199 version:5.86.0 Changes: -------- --- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes 2021-08-16 10:12:07.235060870 +0200 +++ /work/SRC/openSUSE:Factory/.kitemmodels.new.1899/kitemmodels.changes 2021-09-16 23:15:59.875880691 +0200 @@ -1,0 +2,16 @@ +Wed Sep 15 08:24:09 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Drop the unneeded baselibs.conf. + +------------------------------------------------------------------- +Mon Sep 6 06:22:10 UTC 2021 - Christophe Giboudeaux <[email protected]> + +- Update to 5.86.0 + * New feature release + * For more details please see: + * https://kde.org/announcements/frameworks/5/5.86.0 +- Changes since 5.85.0: + * Enable static build of QML plugin + * Don't force QML plugin to be shared library + +------------------------------------------------------------------- Old: ---- baselibs.conf kitemmodels-5.85.0.tar.xz kitemmodels-5.85.0.tar.xz.sig New: ---- kitemmodels-5.86.0.tar.xz kitemmodels-5.86.0.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kitemmodels.spec ++++++ --- /var/tmp/diff_new_pack.Vf5CSV/_old 2021-09-16 23:16:00.423881258 +0200 +++ /var/tmp/diff_new_pack.Vf5CSV/_new 2021-09-16 23:16:00.427881263 +0200 @@ -17,7 +17,7 @@ %define lname libKF5ItemModels5 -%define _tar_path 5.85 +%define _tar_path 5.86 # 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 lang Name: kitemmodels -Version: 5.85.0 +Version: 5.86.0 Release: 0 Summary: Set of item models extending the Qt model-view framework License: LGPL-2.1-or-later @@ -37,7 +37,6 @@ Source1: https://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz.sig Source2: frameworks.keyring %endif -Source99: baselibs.conf BuildRequires: extra-cmake-modules >= %{_kf5_bugfix_version} BuildRequires: fdupes BuildRequires: kf5-filesystem ++++++ kitemmodels-5.85.0.tar.xz -> kitemmodels-5.86.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/.git-blame-ignore-revs new/kitemmodels-5.86.0/.git-blame-ignore-revs --- old/kitemmodels-5.85.0/.git-blame-ignore-revs 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/.git-blame-ignore-revs 2021-09-04 17:46:13.000000000 +0200 @@ -1,3 +1,4 @@ -#clang-format +#clang-format/tidy 2939f001de456004542c988e4b3dc2f389b87ede 54b2e9854a75d1538b6def18551ed88d2eea06cc +2ab018dcb2032d284c5a4c96b1e9f487873854d5 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/CMakeLists.txt new/kitemmodels-5.86.0/CMakeLists.txt --- old/kitemmodels-5.85.0/CMakeLists.txt 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/CMakeLists.txt 2021-09-04 17:46:13.000000000 +0200 @@ -1,10 +1,10 @@ cmake_minimum_required(VERSION 3.16) -set(KF_VERSION "5.85.0") # handled by release scripts +set(KF_VERSION "5.86.0") # handled by release scripts project(KItemModels VERSION ${KF_VERSION}) include(FeatureSummary) -find_package(ECM 5.85.0 NO_MODULE) +find_package(ECM 5.86.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) @@ -17,7 +17,7 @@ include(KDEGitCommitHooks) include(ECMQtDeclareLoggingCategory) -set(REQUIRED_QT_VERSION 5.15.0) +set(REQUIRED_QT_VERSION 5.15.2) find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE) find_package(Qt5Qml ${REQUIRED_QT_VERSION} NO_MODULE) @@ -41,7 +41,7 @@ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5ItemModelsConfigVersion.cmake" SOVERSION 5) -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00) +add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02) add_subdirectory(src) if (BUILD_TESTING) add_subdirectory(autotests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/kconcatenaterowsproxymodeltest.cpp new/kitemmodels-5.86.0/autotests/kconcatenaterowsproxymodeltest.cpp --- old/kitemmodels-5.85.0/autotests/kconcatenaterowsproxymodeltest.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/kconcatenaterowsproxymodeltest.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -69,7 +69,8 @@ QSignalSpy rowInsertedSpy(&pm, SIGNAL(rowsInserted(QModelIndex, int, int))); QSignalSpy rowATBRSpy(&pm, SIGNAL(rowsAboutToBeRemoved(QModelIndex, int, int))); QSignalSpy rowRemovedSpy(&pm, SIGNAL(rowsRemoved(QModelIndex, int, int))); - QIdentityProxyModel i1, i2; + QIdentityProxyModel i1; + QIdentityProxyModel i2; pm.addSourceModel(&i1); pm.addSourceModel(&i2); @@ -96,7 +97,8 @@ KConcatenateRowsProxyModel pm; // When adding two empty models - QIdentityProxyModel i1, i2; + QIdentityProxyModel i1; + QIdentityProxyModel i2; pm.addSourceModel(&i1); pm.addSourceModel(&i2); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/krecursivefilterproxymodeltest.cpp new/kitemmodels-5.86.0/autotests/krecursivefilterproxymodeltest.cpp --- old/kitemmodels-5.85.0/autotests/krecursivefilterproxymodeltest.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/krecursivefilterproxymodeltest.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -68,11 +68,13 @@ QString textForRowSpy(const QModelIndex &parent, int start, int end) { QString txt = parent.data().toString(); - if (!txt.isEmpty()) + if (!txt.isEmpty()) { txt += QLatin1Char('.'); + } txt += QString::number(start + 1); - if (start != end) + if (start != end) { txt += QLatin1Char('-') + QString::number(end + 1); + } return txt; } }; @@ -116,8 +118,9 @@ } const QModelIndex child = model.index(row, 0, parent); ret += child.data().toString(); - if (child.data(Qt::UserRole + 1).toBool()) + if (child.data(Qt::UserRole + 1).toBool()) { ret += QLatin1Char('*'); + } ret += treeAsString(model, child); } ret += QLatin1Char(']'); @@ -144,10 +147,11 @@ if (ch == '[') { // Create new child QStandardItem *child = new QStandardItem; - if (item) + if (item) { item->appendRow(child); - else + } else { model.appendRow(child); + } item = child; } else if (ch == ']') { // Go up to parent @@ -156,10 +160,11 @@ // Create new sibling QStandardItem *child = new QStandardItem; QStandardItem *parent = item->parent(); - if (parent) + if (parent) { parent->appendRow(child); - else + } else { model.appendRow(child); + } item = child; } else { data += ch; @@ -660,10 +665,11 @@ ModelSignalSpy spy(proxy); QStandardItem *itemToRemove = itemByText(model, remove); QVERIFY(itemToRemove); - if (itemToRemove->parent()) + if (itemToRemove->parent()) { itemToRemove->parent()->removeRow(itemToRemove->row()); - else + } else { model.removeRow(itemToRemove->row()); + } QCOMPARE(treeAsString(proxy), expectedProxyStr); // qDebug() << spy.mSignals; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/kselectionproxymodeltest.cpp new/kitemmodels-5.86.0/autotests/kselectionproxymodeltest.cpp --- old/kitemmodels-5.85.0/autotests/kselectionproxymodeltest.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/kselectionproxymodeltest.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -86,15 +86,17 @@ selectionModel.select(QItemSelection(strings.index(0, 0), strings.index(2, 0)), QItemSelectionModel::Select); QCOMPARE(proxy.rowCount(), 3); - for (int i = 0; i < 3; ++i) + for (int i = 0; i < 3; ++i) { QCOMPARE(proxy.index(i, 0).data().toString(), days.at(i)); + } QStringList numbers = {QStringLiteral("One"), QStringLiteral("Two"), QStringLiteral("Three"), QStringLiteral("Four")}; strings.setStringList(numbers); QCOMPARE(proxy.rowCount(), 3); - for (int i = 0; i < 3; ++i) + for (int i = 0; i < 3; ++i) { QCOMPARE(proxy.index(i, 0).data().toString(), numbers.at(i)); + } QVERIFY(selectionModel.selection().contains(strings.index(0, 0))); QVERIFY(selectionModel.selection().contains(strings.index(1, 0))); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp --- old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -263,7 +263,7 @@ } int offset = firstCommand->endRow() - firstCommand->startRow() + 1; - for (ModelMoveCommand *moveCommand : qAsConst(moveCommands)) { + for (ModelMoveCommand *moveCommand : std::as_const(moveCommands)) { moveCommand->setDestAncestors(indexToPath(destParent)); moveCommand->setDestRow(destRowIndex.row() + offset); moveCommand->doCommand(); @@ -542,10 +542,11 @@ } m_model->m_items.insert(id, QString::number(id)); const int rowForDepth = rows[depth]; - if (rowForDepth >= children[column].size()) + if (rowForDepth >= children[column].size()) { children[column].append(id); - else + } else { children[column].insert(rowForDepth, id); + } if (column != m_numCols - 1) { id = m_model->newId(); } @@ -900,7 +901,7 @@ m_model->layoutAboutToBeChanged(); QModelIndexList oldList; - for (const PersistentChange &change : qAsConst(m_changes)) { + for (const PersistentChange &change : std::as_const(m_changes)) { const IndexFinder oldFinder(m_model, change.oldPath); oldList << oldFinder.getIndex(); } @@ -915,7 +916,7 @@ } QModelIndexList newList; - for (const PersistentChange &change : qAsConst(m_changes)) { + for (const PersistentChange &change : std::as_const(m_changes)) { const IndexFinder newFinder(m_model, change.newPath); newList << newFinder.getIndex(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeleventlogger.cpp new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeleventlogger.cpp --- old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeleventlogger.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeleventlogger.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -130,7 +130,7 @@ { QString result(QStringLiteral("QList<int>()")); - for (const int row : qAsConst(m_rowAncestors)) { + for (const int row : std::as_const(m_rowAncestors)) { result.append(" << "); result.append(QString::number(row)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeleventlogger.h new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeleventlogger.h --- old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeleventlogger.h 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeleventlogger.h 2021-09-04 17:46:13.000000000 +0200 @@ -107,7 +107,7 @@ QVariantList changes() const { QVariantList list; - for (PersistentChange *change : qAsConst(m_changedPaths)) { + for (PersistentChange *change : std::as_const(m_changedPaths)) { list.append(QVariant::fromValue(static_cast<QObject *>(change))); } return list; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modelspy.cpp new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modelspy.cpp --- old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modelspy.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modelspy.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -289,7 +289,7 @@ QDebug operator<<(QDebug d, ModelSpy *modelSpy) { d << "ModelSpy("; - for (const QVariantList &list : qAsConst(*modelSpy)) { + for (const QVariantList &list : std::as_const(*modelSpy)) { d << "SIGNAL("; int sigType = list.first().toInt(); d << signaltypes[sigType]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeltest.cpp new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeltest.cpp --- old/kitemmodels-5.85.0/autotests/proxymodeltestsuite/modeltest.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/autotests/proxymodeltestsuite/modeltest.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -39,8 +39,9 @@ void ModelTest::init() { - if (!model) + if (!model) { qFatal("%s: model must not be null", Q_FUNC_INFO); + } connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex, int, int)), this, SLOT(runAllTests())); connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex, int, int)), this, SLOT(runAllTests())); @@ -79,8 +80,9 @@ void ModelTest::runAllTests() { - if (fetchingMore) + if (fetchingMore) { return; + } nonDestructiveBasicTest(); rowCount(); columnCount(); @@ -144,8 +146,9 @@ // check a row count where parent is valid rows = model->rowCount(secondLevelIndex); QVERIFY(rows >= 0); - if (rows > 0) + if (rows > 0) { QVERIFY(model->hasChildren(secondLevelIndex)); + } } // The models rowCount() is tested more extensively in checkChildren(), @@ -163,8 +166,9 @@ // check a column count where parent is valid QModelIndex childIndex = model->index(0, 0, topIndex); - if (childIndex.isValid()) + if (childIndex.isValid()) { QVERIFY(model->columnCount(childIndex) >= 0); + } // columnCount() is tested more extensively in checkChildren(), // but this catches the big mistakes @@ -208,8 +212,9 @@ int rows = model->rowCount(); int columns = model->columnCount(); - if (rows == 0) + if (rows == 0) { return; + } // Catch off by one errors QVERIFY(model->index(rows, columns) == QModelIndex()); @@ -234,8 +239,9 @@ // when asked for the parent of an invalid index. QVERIFY(model->parent(QModelIndex()) == QModelIndex()); - if (model->rowCount() == 0) + if (model->rowCount() == 0) { return; + } // Column 0 | Column 1 | // QModelIndex() | | @@ -290,8 +296,9 @@ { // First just try walking back up the tree. QModelIndex p = parent; - while (p.isValid()) + while (p.isValid()) { p = p.parent(); + } // For models that are dynamically populated if (model->canFetchMore(parent)) { @@ -394,8 +401,9 @@ // Invalid index should return an invalid qvariant QVERIFY(!model->data(QModelIndex()).isValid()); - if (model->rowCount() == 0) + if (model->rowCount() == 0) { return; + } // A valid index should have a valid QVariant data QVERIFY(model->index(0, 0).isValid()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/metainfo.yaml new/kitemmodels-5.86.0/metainfo.yaml --- old/kitemmodels-5.85.0/metainfo.yaml 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/metainfo.yaml 2021-09-04 17:46:13.000000000 +0200 @@ -6,7 +6,7 @@ - name: Linux - name: FreeBSD - name: Windows - - name: MacOSX + - name: macOS - name: Android portingAid: false deprecated: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/kconcatenaterowsproxymodel.cpp new/kitemmodels-5.86.0/src/core/kconcatenaterowsproxymodel.cpp --- old/kitemmodels-5.85.0/src/core/kconcatenaterowsproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/kconcatenaterowsproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -402,7 +402,7 @@ int KConcatenateRowsProxyModelPrivate::computeRowsPrior(const QAbstractItemModel *sourceModel) const { int rowsPrior = 0; - for (const QAbstractItemModel *model : qAsConst(m_models)) { + for (const QAbstractItemModel *model : std::as_const(m_models)) { if (model == sourceModel) { break; } @@ -415,7 +415,7 @@ { int rowCount = 0; QAbstractItemModel *selection = nullptr; - for (QAbstractItemModel *model : qAsConst(m_models)) { + for (QAbstractItemModel *model : std::as_const(m_models)) { const int subRowCount = model->rowCount(); if (rowCount + subRowCount > row) { selection = model; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/kdescendantsproxymodel.cpp new/kitemmodels-5.86.0/src/core/kdescendantsproxymodel.cpp --- old/kitemmodels-5.85.0/src/core/kdescendantsproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/kdescendantsproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -324,14 +324,15 @@ Mapping::right_iterator it = d_ptr->m_mapping.rightLowerBound(rowStart); const Mapping::right_iterator endIt = d_ptr->m_mapping.rightUpperBound(rowEnd); - if (endIt != d_ptr->m_mapping.rightEnd()) + if (endIt != d_ptr->m_mapping.rightEnd()) { while (it != endIt) { it = d_ptr->m_mapping.eraseRight(it); } - else + } else { while (it != d_ptr->m_mapping.rightUpperBound(rowEnd)) { it = d_ptr->m_mapping.eraseRight(it); } + } } d_ptr->m_removePair = qMakePair(rowStart, rowEnd); @@ -982,14 +983,15 @@ Mapping::right_iterator it = m_mapping.rightLowerBound(proxyStart); const Mapping::right_iterator endIt = m_mapping.rightUpperBound(proxyEnd); - if (endIt != m_mapping.rightEnd()) + if (endIt != m_mapping.rightEnd()) { while (it != endIt) { it = m_mapping.eraseRight(it); } - else + } else { while (it != m_mapping.rightUpperBound(proxyEnd)) { it = m_mapping.eraseRight(it); } + } } m_removePair = qMakePair(-1, -1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/kmodelindexproxymapper.cpp new/kitemmodels-5.86.0/src/core/kmodelindexproxymapper.cpp --- old/kitemmodels-5.85.0/src/core/kmodelindexproxymapper.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/kmodelindexproxymapper.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -91,10 +91,10 @@ void KModelIndexProxyMapperPrivate::createProxyChain() { - for (auto p : qAsConst(m_proxyChainUp)) { + for (auto p : std::as_const(m_proxyChainUp)) { p->disconnect(q_ptr); } - for (auto p : qAsConst(m_proxyChainDown)) { + for (auto p : std::as_const(m_proxyChainDown)) { p->disconnect(q_ptr); } m_proxyChainUp.clear(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/krearrangecolumnsproxymodel.cpp new/kitemmodels-5.86.0/src/core/krearrangecolumnsproxymodel.cpp --- old/kitemmodels-5.85.0/src/core/krearrangecolumnsproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/krearrangecolumnsproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -58,10 +58,12 @@ bool KRearrangeColumnsProxyModel::hasChildren(const QModelIndex &parent) const { Q_ASSERT(parent.isValid() ? parent.model() == this : true); - if (!sourceModel()) + if (!sourceModel()) { return false; - if (d_ptr->m_sourceColumns.isEmpty()) // no columns configured yet + } + if (d_ptr->m_sourceColumns.isEmpty()) { // no columns configured yet return false; + } if (parent.column() > 0) { return false; } @@ -79,8 +81,9 @@ Q_ASSERT(row >= 0); #else // workaround for QTreeView bug, fixed in https://codereview.qt-project.org/c/qt/qtbase/+/293092 - if (row < 0) + if (row < 0) { return {}; + } #endif Q_ASSERT(column >= 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/krecursivefilterproxymodel.cpp new/kitemmodels-5.86.0/src/core/krecursivefilterproxymodel.cpp --- old/kitemmodels-5.85.0/src/core/krecursivefilterproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/krecursivefilterproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -253,8 +253,9 @@ } QModelIndexList list; - if (!sourceModel()) + if (!sourceModel()) { return list; + } QModelIndex proxyIndex; const auto lst = sourceModel()->match(mapToSource(start), role, value, hits, flags); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/core/kselectionproxymodel.cpp new/kitemmodels-5.86.0/src/core/kselectionproxymodel.cpp --- old/kitemmodels-5.85.0/src/core/kselectionproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/core/kselectionproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -754,7 +754,7 @@ Q_EMIT q->layoutAboutToBeChanged(); QItemSelection selection; - for (const QModelIndex &rootIndex : qAsConst(m_rootIndexList)) { + for (const QModelIndex &rootIndex : std::as_const(m_rootIndexList)) { // This will be optimized later. Q_EMIT q->rootIndexAboutToBeRemoved(rootIndex, {}); selection.append(QItemSelectionRange(rootIndex, rootIndex)); @@ -1069,7 +1069,7 @@ m_rowsInserted = false; endInsertRows(parent, start, end); q->endInsertRows(); - for (const PendingSelectionChange &pendingChange : qAsConst(m_pendingSelectionChanges)) { + for (const PendingSelectionChange &pendingChange : std::as_const(m_pendingSelectionChanges)) { selectionChanged(pendingChange.selected, pendingChange.deselected); } m_pendingSelectionChanges.clear(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/qml/CMakeLists.txt new/kitemmodels-5.86.0/src/qml/CMakeLists.txt --- old/kitemmodels-5.85.0/src/qml/CMakeLists.txt 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/qml/CMakeLists.txt 2021-09-04 17:46:13.000000000 +0200 @@ -1,4 +1,4 @@ -add_library(itemmodelsplugin SHARED) +add_library(itemmodelsplugin) target_sources(itemmodelsplugin PRIVATE plugin.cpp @@ -7,6 +7,12 @@ ksortfilterproxymodel.cpp ) +if(NOT BUILD_SHARED_LIBS) + target_compile_definitions(itemmodelsplugin PRIVATE -DQT_PLUGIN -DQT_STATICPLUGIN=1) + set_target_properties(itemmodelsplugin PROPERTIES AUTOMOC_MOC_OPTIONS -Muri=org.kde.kitemmodels) + target_sources(itemmodelsplugin PRIVATE kitemmodelsqml.qrc) +endif() + ecm_qt_declare_logging_category(itemmodelsplugin HEADER kitemmodels_debug.h IDENTIFIER KITEMMODELS_LOG diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/qml/kitemmodelsqml.qrc new/kitemmodels-5.86.0/src/qml/kitemmodelsqml.qrc --- old/kitemmodels-5.85.0/src/qml/kitemmodelsqml.qrc 1970-01-01 01:00:00.000000000 +0100 +++ new/kitemmodels-5.86.0/src/qml/kitemmodelsqml.qrc 2021-09-04 17:46:13.000000000 +0200 @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/org/kde/kitemmodels/"> + <file>qmldir</file> + </qresource> +</RCC> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/src/qml/qmldir new/kitemmodels-5.86.0/src/qml/qmldir --- old/kitemmodels-5.85.0/src/qml/qmldir 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/src/qml/qmldir 2021-09-04 17:46:13.000000000 +0200 @@ -1,2 +1,3 @@ module org.kde.kitemmodels plugin itemmodelsplugin +classname Plugin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp new/kitemmodels-5.86.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp --- old/kitemmodels-5.85.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/tests/proxymodeltestapp/breadcrumbnavigationwidget.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -162,8 +162,9 @@ , m_direction(direction) { Q_ASSERT(model == selectionModel->model()); - if (m_direction == Forward) + if (m_direction == Forward) { connect(selectionModel, SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SLOT(navigationSelectionChanged(QItemSelection, QItemSelection))); + } } void KForwardingItemSelectionModel::select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/tests/proxymodeltestapp/breadcrumbswidget.cpp new/kitemmodels-5.86.0/tests/proxymodeltestapp/breadcrumbswidget.cpp --- old/kitemmodels-5.85.0/tests/proxymodeltestapp/breadcrumbswidget.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/tests/proxymodeltestapp/breadcrumbswidget.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -26,7 +26,7 @@ void MultiSelectionModel::select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command) { - for (QItemSelectionModel *selectionModel : qAsConst(m_selectionModels)) { + for (QItemSelectionModel *selectionModel : std::as_const(m_selectionModels)) { selectionModel->select(index, command); } QItemSelectionModel::select(index, command); @@ -34,7 +34,7 @@ void MultiSelectionModel::select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command) { - for (QItemSelectionModel *selectionModel : qAsConst(m_selectionModels)) { + for (QItemSelectionModel *selectionModel : std::as_const(m_selectionModels)) { selectionModel->select(selection, command); } QItemSelectionModel::select(selection, command); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp new/kitemmodels-5.86.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp --- old/kitemmodels-5.85.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/tests/proxymodeltestapp/kreparentingproxymodel.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -532,7 +532,7 @@ if (d->m_pendingRemovalChildIndexes.contains(sourceParent)) { // qDebug() << "#############"; - for (const KReparentingProxyModelPrivate::PendingRemoval &pendingRemoval : qAsConst(d->m_pendingRemovals)) { + for (const KReparentingProxyModelPrivate::PendingRemoval &pendingRemoval : std::as_const(d->m_pendingRemovals)) { // qDebug() << "In" << pendingRemoval.index << pendingRemoval.sourceIndex << sourceParent; if (pendingRemoval.sourceIndex == sourceParent) { // qDebug() << "Out" << pendingRemoval.sourceIndex << sourceParent; @@ -657,7 +657,7 @@ int KReparentingProxyModelPrivate::pendingRemovalRowCount(const QModelIndex &sourceIndex) const { - for (const PendingRemoval &pendingRemoval : qAsConst(m_pendingRemovals)) { + for (const PendingRemoval &pendingRemoval : std::as_const(m_pendingRemovals)) { // qDebug() << pendingRemoval.sourceIndex; if (pendingRemoval.sourceIndex == sourceIndex) { return pendingRemoval.end - pendingRemoval.start + 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/tests/proxymodeltestapp/matchcheckingwidget.cpp new/kitemmodels-5.86.0/tests/proxymodeltestapp/matchcheckingwidget.cpp --- old/kitemmodels-5.85.0/tests/proxymodeltestapp/matchcheckingwidget.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/tests/proxymodeltestapp/matchcheckingwidget.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -64,14 +64,14 @@ m_dynamicTreeWidget->treeView()->selectionModel()->clearSelection(); list = m_dynamicTreeWidget->model()->match(m_dynamicTreeWidget->model()->index(0, 0), DynamicTreeModel::DynamicTreeModelId, id); qDebug() << list; - for (const QModelIndex &idx : qAsConst(list)) { + for (const QModelIndex &idx : std::as_const(list)) { m_dynamicTreeWidget->treeView()->selectionModel()->select(idx, QItemSelectionModel::SelectCurrent); } } else if (m_selectionModelRadioButton->isChecked()) { m_selectionTreeView->selectionModel()->clearSelection(); list = m_selectionTreeView->model()->match(m_selectionTreeView->model()->index(0, 0), DynamicTreeModel::DynamicTreeModelId, id); qDebug() << list; - for (const QModelIndex &idx : qAsConst(list)) { + for (const QModelIndex &idx : std::as_const(list)) { m_selectionTreeView->selectionModel()->select(idx, QItemSelectionModel::SelectCurrent); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kitemmodels-5.85.0/tests/proxymodeltestapp/modelcommanderwidget.cpp new/kitemmodels-5.86.0/tests/proxymodeltestapp/modelcommanderwidget.cpp --- old/kitemmodels-5.85.0/tests/proxymodeltestapp/modelcommanderwidget.cpp 2021-08-03 23:53:53.000000000 +0200 +++ new/kitemmodels-5.86.0/tests/proxymodeltestapp/modelcommanderwidget.cpp 2021-09-04 17:46:13.000000000 +0200 @@ -49,7 +49,7 @@ Q_RETURN_ARG(QStringList, testData), Q_ARG(QString, QString())); - for (const QString &testRun : qAsConst(testData)) { + for (const QString &testRun : std::as_const(testData)) { new QTreeWidgetItem(testFunctionItem, QStringList() << testRun); } }
