[neon/qt6/qt6-base/Neon/release] debian/patches: network_applet_list.diff

Carlos De Maine null at kde.org
Mon Nov 4 05:11:51 GMT 2024


Git commit 9dcde2fe198e15766a1c72f826655621617b9513 by Carlos De Maine.
Committed on 04/11/2024 at 05:11.
Pushed by carlosdem into branch 'Neon/release'.

network_applet_list.diff

A  +55   -0    debian/patches/network_applet_list.diff
M  +4    -0    debian/patches/series

https://invent.kde.org/neon/qt6/qt6-base/-/commit/9dcde2fe198e15766a1c72f826655621617b9513

diff --git a/debian/patches/network_applet_list.diff b/debian/patches/network_applet_list.diff
new file mode 100644
index 0000000..633f109
--- /dev/null
+++ b/debian/patches/network_applet_list.diff
@@ -0,0 +1,55 @@
+diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
+index 5b9b215eab..3d4d566d46 100644
+--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
++++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
+@@ -3400,6 +3400,13 @@ void QAbstractItemModel::endMoveColumns()
+ */
+ void QAbstractItemModel::beginResetModel()
+ {
++    Q_D(QAbstractItemModel);
++    if (d->resetting) {
++        qWarning() << "beginResetModel called on" << this << "without calling endResetModel first";
++        // Warn, but don't return early in case user code relies on the incorrect behavior.
++    }
++
++    d->resetting = true;
+     emit modelAboutToBeReset(QPrivateSignal());
+ }
+ 
+@@ -3417,8 +3424,14 @@ void QAbstractItemModel::beginResetModel()
+ void QAbstractItemModel::endResetModel()
+ {
+     Q_D(QAbstractItemModel);
++    if (!d->resetting) {
++        qWarning() << "endResetModel called on" << this << "without calling beginResetModel first";
++        // Warn, but don't return early in case user code relies on the incorrect behavior.
++    }
++
+     d->invalidatePersistentIndexes();
+     resetInternalData();
++    d->resetting = false;
+     emit modelReset(QPrivateSignal());
+ }
+ 
+diff --git a/src/corelib/itemmodels/qabstractitemmodel_p.h b/src/corelib/itemmodels/qabstractitemmodel_p.h
+index e34dc3262c..c2113fde9a 100644
+--- a/src/corelib/itemmodels/qabstractitemmodel_p.h
++++ b/src/corelib/itemmodels/qabstractitemmodel_p.h
+@@ -45,6 +45,8 @@ public:
+     QAbstractItemModelPrivate();
+     ~QAbstractItemModelPrivate();
+ 
++    static const QAbstractItemModelPrivate *get(const QAbstractItemModel *model) { return model->d_func(); }
++
+     void removePersistentIndexData(QPersistentModelIndexData *data);
+     void movePersistentIndexes(const QList<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent,
+                                Qt::Orientation orientation);
+@@ -115,6 +117,8 @@ public:
+         void insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data);
+     } persistent;
+ 
++    bool resetting = false;
++
+     static const QHash<int,QByteArray> &defaultRoleNames();
+     static bool isVariantLessThan(const QVariant &left, const QVariant &right,
+                                   Qt::CaseSensitivity cs = Qt::CaseSensitive, bool isLocaleAware = false);
diff --git a/debian/patches/series b/debian/patches/series
index 13dd96e..0762d51 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,7 @@ enable_skip_plugins.patch
 forkfd_grow_stack_upwards_on_hppa.patch
 remove_privacy_breaches.diff
 remove_rpath_from_examples.patch
+
+# https://bugs.kde.org/493116
+# fixed in 6.8.1
+network_applet_list.diff


More information about the Neon-commits mailing list