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-05-10 15:35:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kitemmodels (Old)
 and      /work/SRC/openSUSE:Factory/.kitemmodels.new.2988 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kitemmodels"

Mon May 10 15:35:39 2021 rev:91 rq:891762 version:5.82.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kitemmodels/kitemmodels.changes  2021-04-12 
12:36:33.589313136 +0200
+++ /work/SRC/openSUSE:Factory/.kitemmodels.new.2988/kitemmodels.changes        
2021-05-10 15:37:17.494060702 +0200
@@ -1,0 +2,12 @@
+Sat May  1 16:41:00 UTC 2021 - Christophe Giboudeaux <christo...@krop.fr>
+
+- Update to 5.82.0
+  * New feature release
+  * For more details please see:
+  * https://kde.org/announcements/frameworks/5/5.82.0
+- Changes since 5.81.0:
+  * autotests: fix assert in QList::insert() out of bounds
+  * Fix memory leaks detected by ASAN
+  * Port from qsrand/qrand to QRandomGenerator
+
+-------------------------------------------------------------------

Old:
----
  kitemmodels-5.81.0.tar.xz
  kitemmodels-5.81.0.tar.xz.sig

New:
----
  kitemmodels-5.82.0.tar.xz
  kitemmodels-5.82.0.tar.xz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kitemmodels.spec ++++++
--- /var/tmp/diff_new_pack.MDYUol/_old  2021-05-10 15:37:17.990058781 +0200
+++ /var/tmp/diff_new_pack.MDYUol/_new  2021-05-10 15:37:17.994058766 +0200
@@ -17,7 +17,7 @@
 
 
 %define lname   libKF5ItemModels5
-%define _tar_path 5.81
+%define _tar_path 5.82
 # 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.81.0
+Version:        5.82.0
 Release:        0
 Summary:        Set of item models extending the Qt model-view framework
 License:        LGPL-2.1-or-later
@@ -41,8 +41,8 @@
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
 BuildRequires:  kf5-filesystem
-BuildRequires:  cmake(Qt5Core) >= 5.14.0
-BuildRequires:  cmake(Qt5Qml) >= 5.14.0
+BuildRequires:  cmake(Qt5Core) >= 5.15.0
+BuildRequires:  cmake(Qt5Qml) >= 5.15.0
 %if %{with python}
 BuildRequires:  python3-clang
 BuildRequires:  python3-devel
@@ -76,7 +76,7 @@
 Group:          Development/Libraries/KDE
 Requires:       %{lname} = %{version}
 Requires:       extra-cmake-modules
-Requires:       cmake(Qt5Core) >= 5.14.0
+Requires:       cmake(Qt5Core) >= 5.15.0
 
 %description devel
 KItemModels provides a set of item models extending the Qt model-view 
framework.
@@ -95,15 +95,15 @@
 %endif
 
 %prep
-%setup -q
+%autosetup -p1
 
 %build
-  %cmake_kf5 -d build
-  %cmake_build
+%cmake_kf5 -d build
+%cmake_build
 
 %install
-  %kf5_makeinstall -C build
-  %fdupes %{buildroot}
+%kf5_makeinstall -C build
+%fdupes %{buildroot}
 
 %post -n %{lname} -p /sbin/ldconfig
 %postun -n %{lname} -p /sbin/ldconfig


++++++ kitemmodels-5.81.0.tar.xz -> kitemmodels-5.82.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kitemmodels-5.81.0/.gitignore 
new/kitemmodels-5.82.0/.gitignore
--- old/kitemmodels-5.81.0/.gitignore   2021-04-03 11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/.gitignore   2021-05-01 11:42:51.000000000 +0200
@@ -22,3 +22,6 @@
 .cmake/
 /.clang-format
 /compile_commands.json
+.clangd
+.idea
+/cmake-build*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kitemmodels-5.81.0/CMakeLists.txt 
new/kitemmodels-5.82.0/CMakeLists.txt
--- old/kitemmodels-5.81.0/CMakeLists.txt       2021-04-03 11:34:21.000000000 
+0200
+++ new/kitemmodels-5.82.0/CMakeLists.txt       2021-05-01 11:42:51.000000000 
+0200
@@ -1,10 +1,10 @@
 cmake_minimum_required(VERSION 3.5)
 
-set(KF_VERSION "5.81.0") # handled by release scripts
+set(KF_VERSION "5.82.0") # handled by release scripts
 project(KItemModels VERSION ${KF_VERSION})
 
 include(FeatureSummary)
-find_package(ECM 5.81.0  NO_MODULE)
+find_package(ECM 5.82.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.14.0)
+set(REQUIRED_QT_VERSION 5.15.0)
 find_package(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED NO_MODULE)
 find_package(Qt5Qml ${REQUIRED_QT_VERSION} NO_MODULE)
 
@@ -42,7 +42,7 @@
                         SOVERSION 5)
 add_definitions(-DQT_NO_KEYWORDS)
 add_definitions(-DQT_NO_FOREACH)
-add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050e00)
+add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f00)
 add_subdirectory(src)
 if (BUILD_TESTING)
     add_subdirectory(autotests)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kitemmodels-5.81.0/autotests/bihash/benchmarks.cpp 
new/kitemmodels-5.82.0/autotests/bihash/benchmarks.cpp
--- old/kitemmodels-5.81.0/autotests/bihash/benchmarks.cpp      2021-04-03 
11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/autotests/bihash/benchmarks.cpp      2021-05-01 
11:42:51.000000000 +0200
@@ -87,8 +87,8 @@
     Q_OBJECT
 public:
     BiHashBenchmarks(QObject *parent = nullptr)
+        : QObject(parent)
     {
-        qsrand(QDateTime::currentDateTime().toSecsSinceEpoch());
     }
 
 private:
@@ -103,6 +103,8 @@
     }
     void getTestData();
 
+    QRandomGenerator m_randomGenerator;
+
 private Q_SLOTS:
 
     void testInsert();
@@ -198,7 +200,7 @@
     Hash hash = createHash(numElements);
 
     Hash::mapped_type result;
-    const Hash::key_type key = containedValue<Hash::key_type>(qrand() % 
numElements);
+    const Hash::key_type key = 
containedValue<Hash::key_type>(m_randomGenerator.bounded(numElements));
 
 #ifdef KBIHASH
     Mapping biHash = Mapping::fromHash(hash);
@@ -230,7 +232,7 @@
     Hash hash = createHash(numElements);
 
     Hash::key_type result;
-    const Hash::mapped_type value = containedValue<Hash::mapped_type>(qrand() 
% numElements);
+    const Hash::mapped_type value = 
containedValue<Hash::mapped_type>(m_randomGenerator.bounded(numElements));
 
 #ifdef KBIHASH
     Mapping biHash = Mapping::fromHash(hash);
@@ -261,7 +263,7 @@
     QFETCH(int, numElements);
     Hash hash = createHash(numElements);
 
-    const Hash::key_type key = containedValue<Hash::key_type>(qrand() % 
numElements);
+    const Hash::key_type key = 
containedValue<Hash::key_type>(m_randomGenerator.bounded(numElements));
     Hash::mapped_type value;
 
 #ifdef KBIHASH
@@ -295,7 +297,7 @@
     Hash hash = createHash(numElements);
 
     Hash::key_type result;
-    const Hash::mapped_type value = containedValue<Hash::mapped_type>(qrand() 
% numElements);
+    const Hash::mapped_type value = 
containedValue<Hash::mapped_type>(m_randomGenerator.bounded(numElements));
 
 #ifdef KBIHASH
     Mapping biHash = Mapping::fromHash(hash);
@@ -328,7 +330,7 @@
     QFETCH(int, numElements);
     Hash hash = createHash(numElements);
 
-    const int num = qrand() % numElements;
+    const int num = m_randomGenerator.bounded(numElements);
     const Hash::key_type oldKey = containedValue<Hash::key_type>(num);
     const Hash::key_type newKey = updatedValue<Hash::key_type>(num);
 
@@ -364,7 +366,7 @@
     QFETCH(int, numElements);
     Hash hash = createHash(numElements);
 
-    const int num = qrand() % numElements;
+    const int num = m_randomGenerator.bounded(numElements);
     const Hash::key_type key = containedValue<Hash::key_type>(num);
 
 #ifdef KBIHASH
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kitemmodels-5.81.0/autotests/kcolumnheadersmodeltest.cpp 
new/kitemmodels-5.82.0/autotests/kcolumnheadersmodeltest.cpp
--- old/kitemmodels-5.81.0/autotests/kcolumnheadersmodeltest.cpp        
2021-04-03 11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/autotests/kcolumnheadersmodeltest.cpp        
2021-05-01 11:42:51.000000000 +0200
@@ -18,15 +18,15 @@
 private Q_SLOTS:
     void testStatic()
     {
-        auto model = new KColumnHeadersModel{};
+        auto model = new KColumnHeadersModel{this};
 
-        auto sourceModel = new QStandardItemModel{};
+        auto sourceModel = new QStandardItemModel{this};
         sourceModel->setHorizontalHeaderLabels(
             {QStringLiteral("Test 1"), QStringLiteral("Test 2"), 
QStringLiteral("Test 3"), QStringLiteral("Test 4"), QStringLiteral("Test 5")});
 
         model->setSourceModel(sourceModel);
 
-        new QAbstractItemModelTester(model);
+        new QAbstractItemModelTester(model, this);
 
         QCOMPARE(model->rowCount(), 5);
         QCOMPARE(model->data(model->index(0, 0), Qt::DisplayRole).toString(), 
QStringLiteral("Test 1"));
@@ -46,12 +46,12 @@
 
     void testAddColumns()
     {
-        auto model = new KColumnHeadersModel{};
-        auto sourceModel = new QStandardItemModel{};
+        auto model = new KColumnHeadersModel{this};
+        auto sourceModel = new QStandardItemModel{this};
         sourceModel->setHorizontalHeaderLabels({QStringLiteral("Test 1"), 
QStringLiteral("Test 2")});
         model->setSourceModel(sourceModel);
 
-        new QAbstractItemModelTester(model);
+        new QAbstractItemModelTester(model, this);
 
         QSignalSpy spy{model, &QAbstractItemModel::rowsInserted};
         QVERIFY(spy.isValid());
@@ -98,15 +98,15 @@
 
     void testRemoveColumns()
     {
-        auto model = new KColumnHeadersModel{};
+        auto model = new KColumnHeadersModel{this};
 
-        auto sourceModel = new QStandardItemModel{};
+        auto sourceModel = new QStandardItemModel{this};
         sourceModel->setHorizontalHeaderLabels(
             {QStringLiteral("Test 1"), QStringLiteral("Test 2"), 
QStringLiteral("Test 3"), QStringLiteral("Test 4"), QStringLiteral("Test 5")});
 
         model->setSourceModel(sourceModel);
 
-        new QAbstractItemModelTester(model);
+        new QAbstractItemModelTester(model, this);
 
         QSignalSpy spy{model, &QAbstractItemModel::rowsRemoved};
         QVERIFY(spy.isValid());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kitemmodels-5.81.0/autotests/kdescendantsproxymodeltest.cpp 
new/kitemmodels-5.82.0/autotests/kdescendantsproxymodeltest.cpp
--- old/kitemmodels-5.81.0/autotests/kdescendantsproxymodeltest.cpp     
2021-04-03 11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/autotests/kdescendantsproxymodeltest.cpp     
2021-05-01 11:42:51.000000000 +0200
@@ -12,6 +12,11 @@
 #include <QTest>
 
 struct Node {
+    ~Node()
+    {
+        qDeleteAll(children);
+    }
+
     QString label;
     Node *parent = nullptr;
     QList<Node *> children;
@@ -22,7 +27,7 @@
     Q_OBJECT
 public:
     explicit SimpleObjectModel(QObject *parent = nullptr);
-    ~SimpleObjectModel();
+    ~SimpleObjectModel() override;
 
     QModelIndex index(int, int, const QModelIndex &parent = QModelIndex()) 
const override;
     QModelIndex parent(const QModelIndex &) const override;
@@ -46,6 +51,7 @@
 
 SimpleObjectModel::~SimpleObjectModel()
 {
+    delete m_root;
 }
 
 QModelIndex SimpleObjectModel::index(int row, int col, const QModelIndex 
&parent) const
@@ -235,7 +241,7 @@
          *    |- child1
          *    `- child2
          */
-        QStandardItemModel *model = new QStandardItemModel();
+        QStandardItemModel *model = new QStandardItemModel(this);
         for (int i = 0; i < 2; i++) {
             QStandardItem *item = new QStandardItem();
             item->setData(QString(prefix + QString::number(i)), 
Qt::DisplayRole);
@@ -563,7 +569,7 @@
 
 void tst_KDescendantProxyModel::testMoveInsideCollapsed()
 {
-    SimpleObjectModel *model = new SimpleObjectModel;
+    SimpleObjectModel *model = new SimpleObjectModel(this);
     model->insert(QModelIndex(), 0, QStringLiteral("Model0"));
     model->insert(QModelIndex(), 1, QStringLiteral("Model1"));
     model->insert(QModelIndex(), 2, QStringLiteral("Model2"));
@@ -622,7 +628,7 @@
 
 void tst_KDescendantProxyModel::testExpandInsideCollapsed()
 {
-    SimpleObjectModel *model = new SimpleObjectModel;
+    SimpleObjectModel *model = new SimpleObjectModel(this);
     model->insert(QModelIndex(), 0, QStringLiteral("Model0"));
     model->insert(QModelIndex(), 1, QStringLiteral("Model1"));
     model->insert(QModelIndex(), 2, QStringLiteral("Model2"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kitemmodels-5.81.0/autotests/krearrangecolumnsproxymodeltest.cpp 
new/kitemmodels-5.82.0/autotests/krearrangecolumnsproxymodeltest.cpp
--- old/kitemmodels-5.81.0/autotests/krearrangecolumnsproxymodeltest.cpp        
2021-04-03 11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/autotests/krearrangecolumnsproxymodeltest.cpp        
2021-05-01 11:42:51.000000000 +0200
@@ -126,7 +126,7 @@
     {
         // Given a rearrange-columns proxy
         KRearrangeColumnsProxyModel pm;
-        new QAbstractItemModelTester(&pm);
+        new QAbstractItemModelTester(&pm, &pm);
 
         // When setting it to a source model, with columns rearranged
         setup(pm);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kitemmodels-5.81.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp 
new/kitemmodels-5.82.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp
--- old/kitemmodels-5.81.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp   
2021-04-03 11:34:21.000000000 +0200
+++ new/kitemmodels-5.82.0/autotests/proxymodeltestsuite/dynamictreemodel.cpp   
2021-05-01 11:42:51.000000000 +0200
@@ -536,11 +536,16 @@
         id = m_model->newId();
         lastId = id;
         for (int column = 0; column < m_numCols; ++column) {
-            if (m_model->m_childItems[fragmentParentIdentifier].size() <= 
column) {
-                
m_model->m_childItems[fragmentParentIdentifier].append(QList<qint64>());
+            QList<QList<qint64>> &children = 
m_model->m_childItems[fragmentParentIdentifier];
+            if (children.size() <= column) {
+                children.append(QList<qint64>());
             }
             m_model->m_items.insert(id, QString::number(id));
-            
m_model->m_childItems[fragmentParentIdentifier][column].insert(rows[depth], id);
+            const int rowForDepth = rows[depth];
+            if (rowForDepth >= children[column].size())
+                children[column].append(id);
+            else
+                children[column].insert(rowForDepth, id);
             if (column != m_numCols - 1) {
                 id = m_model->newId();
             }
@@ -862,10 +867,10 @@
     bool blocked = m_model->blockSignals(true);
     m_model->clear();
     if (!m_treeString.isEmpty()) {
-        ModelInsertCommand *ins = new ModelInsertCommand(m_model);
-        ins->setStartRow(0);
-        ins->interpret(m_treeString);
-        ins->doCommand();
+        ModelInsertCommand ins(m_model);
+        ins.setStartRow(0);
+        ins.interpret(m_treeString);
+        ins.doCommand();
     }
     m_model->blockSignals(blocked);
     m_model->endResetModel();

Reply via email to