Improve column updates granularity

PR #17806.
This commit is contained in:
Chocobo1
2022-10-03 11:56:48 +08:00
committed by GitHub
parent d96ed5f4a4
commit 9a81cbf4c0
2 changed files with 53 additions and 17 deletions

View File

@@ -31,6 +31,7 @@
#include <QAbstractItemModel>
#include <QVector>
#include "base/indexrange.h"
#include "torrentcontentmodelitem.h"
class QFileIconProvider;
@@ -80,7 +81,9 @@ signals:
void filteredFilesChanged();
private:
void notifyModelUpdate(const QModelIndex &index);
using ColumnInterval = IndexInterval<int>;
void notifySubtreeUpdated(const QModelIndex &index, const QVector<ColumnInterval> &columns);
TorrentContentModelFolder *m_rootItem = nullptr;
QVector<TorrentContentModelFile *> m_filesIndex;