mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Add a Tags (multi-label) feature to the GUI. Closes #13.
See https://github.com/qbittorrent/qBittorrent/issues/13 for details.
This commit is contained in:
@@ -59,6 +59,18 @@ void TransferListSortModel::disableCategoryFilter()
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransferListSortModel::setTagFilter(const QString &tag)
|
||||
{
|
||||
if (m_filter.setTag(tag))
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransferListSortModel::disableTagFilter()
|
||||
{
|
||||
if (m_filter.setTag(TorrentFilter::AnyTag))
|
||||
invalidateFilter();
|
||||
}
|
||||
|
||||
void TransferListSortModel::setTrackerFilter(const QStringList &hashes)
|
||||
{
|
||||
if (m_filter.setHashSet(hashes.toSet()))
|
||||
@@ -75,6 +87,7 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
||||
{
|
||||
switch (sortColumn()) {
|
||||
case TorrentModel::TR_CATEGORY:
|
||||
case TorrentModel::TR_TAGS:
|
||||
case TorrentModel::TR_NAME: {
|
||||
QVariant vL = left.data();
|
||||
QVariant vR = right.data();
|
||||
|
||||
Reference in New Issue
Block a user