mirror of
https://github.com/transmission/transmission.git
synced 2025-12-24 12:28:52 +00:00
fix: invalidateFilter() Qt deprecation warning (#7940)
This commit is contained in:
@@ -13,8 +13,18 @@ TrackerModelFilter::TrackerModelFilter(QObject* parent)
|
|||||||
|
|
||||||
void TrackerModelFilter::setShowBackupTrackers(bool b)
|
void TrackerModelFilter::setShowBackupTrackers(bool b)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 10, 0)
|
||||||
|
|
||||||
show_backups_ = b;
|
show_backups_ = b;
|
||||||
invalidateFilter();
|
invalidateFilter(); // deprecated in Qt 6.13
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
beginFilterChange();
|
||||||
|
show_backups_ = b;
|
||||||
|
endFilterChange(QSortFilterProxyModel::Direction::Rows);
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TrackerModelFilter::filterAcceptsRow(int source_row, QModelIndex const& source_parent) const
|
bool TrackerModelFilter::filterAcceptsRow(int source_row, QModelIndex const& source_parent) const
|
||||||
|
|||||||
Reference in New Issue
Block a user