mirror of
https://github.com/transmission/transmission
synced 2025-01-30 10:52:00 +00:00
refactor: prefer std::set over QSet (#5703)
* refactor: use std::set instead of QSet in WatchDir.cc * refactor: use std::set instead of QSet in FileTreeView.cc * refactor: use std::set instead of QSet in ColumnResizer.cc * refactor: use std::set instead of QSet in Prefs.cc * chore: fix rebase error that changed libsmall snapshot * refactor: more replace QSet with std::set
This commit is contained in:
parent
69b293a793
commit
237223aeaf
20 changed files with 90 additions and 91 deletions
|
@ -1006,7 +1006,6 @@ private:
|
|||
friend tr_stat const* tr_torrentStat(tr_torrent* tor);
|
||||
friend tr_torrent* tr_torrentNew(tr_ctor* ctor, tr_torrent** setme_duplicate_of);
|
||||
friend uint64_t tr_torrentGetBytesLeftToAllocate(tr_torrent const* tor);
|
||||
friend uint64_t tr_torrentGetBytesLeftToAllocate(tr_torrent const* tor);
|
||||
|
||||
enum class VerifyState : uint8_t
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ ColumnResizer::ColumnResizer(QObject* parent)
|
|||
|
||||
void ColumnResizer::addLayout(QGridLayout* layout)
|
||||
{
|
||||
layouts_ << layout;
|
||||
layouts_.emplace(layout);
|
||||
scheduleUpdate();
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <set>
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
@ -33,5 +34,5 @@ private:
|
|||
void scheduleUpdate();
|
||||
|
||||
QTimer timer_;
|
||||
QSet<QGridLayout*> layouts_;
|
||||
std::set<QGridLayout*> layouts_;
|
||||
};
|
||||
|
|
|
@ -1428,19 +1428,20 @@ void DetailsDialog::onRemoveTrackerClicked()
|
|||
// make a map of torrentIds to announce URLs to remove
|
||||
QItemSelectionModel* selection_model = ui_.trackersView->selectionModel();
|
||||
QModelIndexList const selected_rows = selection_model->selectedRows();
|
||||
QMultiMap<int, int> torrent_id_to_tracker_ids;
|
||||
auto torrent_id_to_tracker_ids = std::map<int, std::set<int>>{};
|
||||
|
||||
for (QModelIndex const& i : selected_rows)
|
||||
for (auto const& model_index : selected_rows)
|
||||
{
|
||||
auto const inf = ui_.trackersView->model()->data(i, TrackerModel::TrackerRole).value<TrackerInfo>();
|
||||
torrent_id_to_tracker_ids.insert(inf.torrent_id, inf.st.id);
|
||||
auto const inf = ui_.trackersView->model()->data(model_index, TrackerModel::TrackerRole).value<TrackerInfo>();
|
||||
torrent_id_to_tracker_ids[inf.torrent_id].insert(inf.st.id);
|
||||
}
|
||||
|
||||
// batch all of a tracker's torrents into one command
|
||||
for (int const id : torrent_id_to_tracker_ids.uniqueKeys())
|
||||
for (auto const& [torrent_id, tracker_ids] : torrent_id_to_tracker_ids)
|
||||
{
|
||||
torrent_ids_t const ids{ id };
|
||||
torrentSet(ids, TR_KEY_trackerRemove, torrent_id_to_tracker_ids.values(id));
|
||||
auto const ids = torrent_ids_t{ torrent_id };
|
||||
auto const values = std::vector<int>{ std::begin(tracker_ids), std::end(tracker_ids) };
|
||||
torrentSet(ids, TR_KEY_trackerRemove, values);
|
||||
}
|
||||
|
||||
selection_model->clearSelection();
|
||||
|
@ -1582,15 +1583,15 @@ static constexpr tr_quark priorityKey(int priority)
|
|||
}
|
||||
}
|
||||
|
||||
void DetailsDialog::onFilePriorityChanged(QSet<int> const& indices, int priority)
|
||||
void DetailsDialog::onFilePriorityChanged(file_indices_t const& indices, int priority)
|
||||
{
|
||||
torrentSet(priorityKey(priority), indices.values());
|
||||
torrentSet(priorityKey(priority), std::vector<int>{ std::begin(indices), std::end(indices) });
|
||||
}
|
||||
|
||||
void DetailsDialog::onFileWantedChanged(QSet<int> const& indices, bool wanted)
|
||||
void DetailsDialog::onFileWantedChanged(file_indices_t const& indices, bool wanted)
|
||||
{
|
||||
tr_quark const key = wanted ? TR_KEY_files_wanted : TR_KEY_files_unwanted;
|
||||
torrentSet(key, indices.values());
|
||||
torrentSet(key, std::vector<int>{ std::begin(indices), std::end(indices) });
|
||||
}
|
||||
|
||||
void DetailsDialog::onPathEdited(QString const& old_path, QString const& new_name)
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#include <unordered_set>
|
||||
|
||||
#include <QString>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
@ -77,8 +76,8 @@ private slots:
|
|||
void onTrackerListEdited(QString);
|
||||
|
||||
// Files tab
|
||||
void onFilePriorityChanged(QSet<int> const& file_indices, int);
|
||||
void onFileWantedChanged(QSet<int> const& file_indices, bool);
|
||||
void onFilePriorityChanged(file_indices_t const& file_indices, int);
|
||||
void onFileWantedChanged(file_indices_t const& file_indices, bool);
|
||||
void onPathEdited(QString const& old_path, QString const& new_name);
|
||||
void onOpenRequested(QString const& path) const;
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ int FileTreeItem::priority() const
|
|||
return i;
|
||||
}
|
||||
|
||||
void FileTreeItem::setSubtreePriority(int priority, QSet<int>& ids)
|
||||
void FileTreeItem::setSubtreePriority(int priority, file_indices_t& setme_changed_ids)
|
||||
{
|
||||
if (priority_ != priority)
|
||||
{
|
||||
|
@ -344,13 +344,13 @@ void FileTreeItem::setSubtreePriority(int priority, QSet<int>& ids)
|
|||
|
||||
if (file_index_ >= 0)
|
||||
{
|
||||
ids.insert(file_index_);
|
||||
setme_changed_ids.insert(file_index_);
|
||||
}
|
||||
}
|
||||
|
||||
for (FileTreeItem* const child : children_)
|
||||
{
|
||||
child->setSubtreePriority(priority, ids);
|
||||
child->setSubtreePriority(priority, setme_changed_ids);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,21 +386,21 @@ int FileTreeItem::isSubtreeWanted() const
|
|||
return wanted;
|
||||
}
|
||||
|
||||
void FileTreeItem::setSubtreeWanted(bool b, QSet<int>& ids)
|
||||
void FileTreeItem::setSubtreeWanted(bool wanted, file_indices_t& setme_changed_ids)
|
||||
{
|
||||
if (is_wanted_ != b)
|
||||
if (is_wanted_ != wanted)
|
||||
{
|
||||
is_wanted_ = b;
|
||||
is_wanted_ = wanted;
|
||||
|
||||
if (file_index_ >= 0)
|
||||
{
|
||||
ids.insert(file_index_);
|
||||
setme_changed_ids.insert(file_index_);
|
||||
}
|
||||
}
|
||||
|
||||
for (FileTreeItem* const child : children_)
|
||||
{
|
||||
child->setSubtreeWanted(b, ids);
|
||||
child->setSubtreeWanted(wanted, setme_changed_ids);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
#include <vector>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
||||
#include "Utils.h" // for std::hash<QString>
|
||||
#include "Typedefs.h"
|
||||
|
||||
class FileTreeItem
|
||||
{
|
||||
|
@ -69,8 +69,8 @@ public:
|
|||
|
||||
QVariant data(int column, int role) const;
|
||||
std::pair<int, int> update(QString const& name, bool want, int priority, uint64_t have, bool update_fields);
|
||||
void setSubtreeWanted(bool, QSet<int>& file_ids);
|
||||
void setSubtreePriority(int priority, QSet<int>& file_ids);
|
||||
void setSubtreeWanted(bool wanted, file_indices_t& setme_changed_ids);
|
||||
void setSubtreePriority(int priority, file_indices_t& setme_changed_ids);
|
||||
|
||||
[[nodiscard]] constexpr auto fileIndex() const noexcept
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <cassert>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include <libtransmission/transmission.h> // priorities
|
||||
|
||||
|
@ -412,7 +413,7 @@ void FileTreeModel::emitParentsChanged(
|
|||
QModelIndex const& index,
|
||||
int first_column,
|
||||
int last_column,
|
||||
QSet<QModelIndex>* visited_parent_indices)
|
||||
std::set<QModelIndex>* visited_parent_indices)
|
||||
{
|
||||
assert(first_column <= last_column);
|
||||
|
||||
|
@ -429,7 +430,7 @@ void FileTreeModel::emitParentsChanged(
|
|||
|
||||
if (visited_parent_indices != nullptr)
|
||||
{
|
||||
if (visited_parent_indices->contains(walk))
|
||||
if (visited_parent_indices->count(walk) != 0U)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -525,7 +526,7 @@ void FileTreeModel::setWanted(QModelIndexList const& indices, bool wanted)
|
|||
|
||||
QModelIndexList const orphan_indices = getOrphanIndices(indices);
|
||||
|
||||
QSet<int> file_ids;
|
||||
auto file_ids = file_indices_t{};
|
||||
|
||||
for (QModelIndex const& i : orphan_indices)
|
||||
{
|
||||
|
@ -537,14 +538,14 @@ void FileTreeModel::setWanted(QModelIndexList const& indices, bool wanted)
|
|||
}
|
||||
|
||||
// emit parent changes separately to avoid multiple updates for same items
|
||||
QSet<QModelIndex> parent_indices;
|
||||
auto parent_indices = std::set<QModelIndex>{};
|
||||
|
||||
for (QModelIndex const& i : orphan_indices)
|
||||
{
|
||||
emitParentsChanged(i, COL_SIZE, COL_WANTED, &parent_indices);
|
||||
}
|
||||
|
||||
if (!file_ids.isEmpty())
|
||||
if (!std::empty(file_ids))
|
||||
{
|
||||
emit wantedChanged(file_ids, wanted);
|
||||
}
|
||||
|
@ -559,7 +560,7 @@ void FileTreeModel::setPriority(QModelIndexList const& indices, int priority)
|
|||
|
||||
QModelIndexList const orphan_indices = getOrphanIndices(indices);
|
||||
|
||||
QSet<int> file_ids;
|
||||
auto file_ids = file_indices_t{};
|
||||
|
||||
for (QModelIndex const& i : orphan_indices)
|
||||
{
|
||||
|
@ -571,14 +572,13 @@ void FileTreeModel::setPriority(QModelIndexList const& indices, int priority)
|
|||
}
|
||||
|
||||
// emit parent changes separately to avoid multiple updates for same items
|
||||
QSet<QModelIndex> parent_indices;
|
||||
|
||||
auto parent_indices = std::set<QModelIndex>{};
|
||||
for (QModelIndex const& i : orphan_indices)
|
||||
{
|
||||
emitParentsChanged(i, COL_PRIORITY, COL_PRIORITY, &parent_indices);
|
||||
}
|
||||
|
||||
if (!file_ids.isEmpty())
|
||||
if (!std::empty(file_ids))
|
||||
{
|
||||
emit priorityChanged(file_ids, priority);
|
||||
}
|
||||
|
|
|
@ -8,12 +8,14 @@
|
|||
#include <cstdint> // uint64_t
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QSet>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
||||
#include "Typedefs.h" // file_indices_t
|
||||
|
||||
class FileTreeItem;
|
||||
|
||||
class FileTreeModel final : public QAbstractItemModel
|
||||
|
@ -77,8 +79,8 @@ public:
|
|||
bool setData(QModelIndex const& index, QVariant const& value, int role = Qt::EditRole) override;
|
||||
|
||||
signals:
|
||||
void priorityChanged(QSet<int> const& file_indices, int);
|
||||
void wantedChanged(QSet<int> const& file_indices, bool);
|
||||
void priorityChanged(file_indices_t const& file_indices, int);
|
||||
void wantedChanged(file_indices_t const& file_indices, bool);
|
||||
void pathEdited(QString const& oldpath, QString const& new_name);
|
||||
void openRequested(QString const& path);
|
||||
|
||||
|
@ -89,7 +91,7 @@ private:
|
|||
QModelIndex const&,
|
||||
int first_column,
|
||||
int last_column,
|
||||
QSet<QModelIndex>* visited_parent_indices = nullptr);
|
||||
std::set<QModelIndex>* visited_parent_indices = nullptr);
|
||||
void emitSubtreeChanged(QModelIndex const&, int first_column, int last_column);
|
||||
FileTreeItem* findItemForFileIndex(int file_index) const;
|
||||
FileTreeItem* itemFromIndex(QModelIndex const&) const;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QMenu>
|
||||
|
@ -253,7 +254,7 @@ void FileTreeView::onlyCheckSelectedItems()
|
|||
|
||||
std::sort(wanted_indices.begin(), wanted_indices.end());
|
||||
|
||||
QSet<QModelIndex> wanted_indices_parents;
|
||||
auto wanted_indices_parents = std::set<QModelIndex>{};
|
||||
|
||||
for (QModelIndex const& i : wanted_indices)
|
||||
{
|
||||
|
@ -294,7 +295,7 @@ void FileTreeView::onlyCheckSelectedItems()
|
|||
{
|
||||
unwanted_indices << child_index;
|
||||
}
|
||||
else if (!wanted_indices_parents.contains(child_index))
|
||||
else if (wanted_indices_parents.count(child_index) == 0U)
|
||||
{
|
||||
unwanted_indices << child_index;
|
||||
}
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <QSet>
|
||||
#include <QTreeView>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
||||
#include "Torrent.h" // FileList
|
||||
#include "Typedefs.h" // file_indices_t
|
||||
|
||||
class QAction;
|
||||
class QMenu;
|
||||
|
@ -33,8 +33,8 @@ public:
|
|||
void setEditable(bool editable);
|
||||
|
||||
signals:
|
||||
void priorityChanged(QSet<int> const& file_indices, int priority);
|
||||
void wantedChanged(QSet<int> const& file_indices, bool wanted);
|
||||
void priorityChanged(file_indices_t const& file_indices, int priority);
|
||||
void wantedChanged(file_indices_t const& file_indices, bool wanted);
|
||||
void pathEdited(QString const& old_path, QString const& new_name);
|
||||
void openRequested(QString const& path);
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ void OptionsDialog::onSessionUpdated()
|
|||
}
|
||||
}
|
||||
|
||||
void OptionsDialog::onPriorityChanged(QSet<int> const& file_indices, int priority)
|
||||
void OptionsDialog::onPriorityChanged(file_indices_t const& file_indices, int priority)
|
||||
{
|
||||
for (int const i : file_indices)
|
||||
{
|
||||
|
@ -213,7 +213,7 @@ void OptionsDialog::onPriorityChanged(QSet<int> const& file_indices, int priorit
|
|||
}
|
||||
}
|
||||
|
||||
void OptionsDialog::onWantedChanged(QSet<int> const& file_indices, bool is_wanted)
|
||||
void OptionsDialog::onWantedChanged(file_indices_t const& file_indices, bool is_wanted)
|
||||
{
|
||||
for (int const i : file_indices)
|
||||
{
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -20,6 +19,7 @@
|
|||
#include "AddData.h" // AddData
|
||||
#include "BaseDialog.h"
|
||||
#include "Torrent.h" // FileList
|
||||
#include "Typedefs.h" // file_indices_t
|
||||
#include "ui_OptionsDialog.h"
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
|
@ -45,8 +45,8 @@ public:
|
|||
|
||||
private slots:
|
||||
void onAccepted();
|
||||
void onPriorityChanged(QSet<int> const& file_indices, int);
|
||||
void onWantedChanged(QSet<int> const& file_indices, bool);
|
||||
void onPriorityChanged(file_indices_t const& file_indices, int);
|
||||
void onWantedChanged(file_indices_t const& file_indices, bool);
|
||||
|
||||
void onSourceChanged();
|
||||
void onDestinationChanged();
|
||||
|
|
|
@ -225,7 +225,7 @@ Prefs::Prefs(QString config_dir)
|
|||
|
||||
// these are the prefs that don't get saved to settings.json
|
||||
// when the application exits.
|
||||
temporary_prefs_ << FILTER_TEXT;
|
||||
temporary_prefs_.insert(FILTER_TEXT);
|
||||
|
||||
auto top = get_default_app_settings();
|
||||
top.merge(tr_sessionLoadSettings(config_dir_.toUtf8().constData(), nullptr));
|
||||
|
@ -326,7 +326,7 @@ Prefs::~Prefs()
|
|||
|
||||
for (int i = 0; i < PREFS_COUNT; ++i)
|
||||
{
|
||||
if (temporary_prefs_.contains(i))
|
||||
if (temporary_prefs_.count(i) != 0U)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <set>
|
||||
|
||||
#include <QObject>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
|
@ -204,7 +204,7 @@ private:
|
|||
|
||||
QString const config_dir_;
|
||||
|
||||
QSet<int> temporary_prefs_;
|
||||
std::set<int> temporary_prefs_;
|
||||
std::array<QVariant, PREFS_COUNT> mutable values_;
|
||||
|
||||
static std::array<PrefItem, PREFS_COUNT> const Items;
|
||||
|
|
|
@ -460,7 +460,7 @@ Session::Tag Session::torrentSet(torrent_ids_t const& torrent_ids, tr_quark cons
|
|||
return torrentSetImpl(&args);
|
||||
}
|
||||
|
||||
Session::Tag Session::torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, QList<int> const& value)
|
||||
Session::Tag Session::torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, std::vector<int> const& value)
|
||||
{
|
||||
tr_variant args;
|
||||
tr_variantInitDict(&args, 2);
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, int val);
|
||||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, double val);
|
||||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, QString const& val);
|
||||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, QList<int> const& val);
|
||||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, std::vector<int> const& val);
|
||||
Tag torrentSet(torrent_ids_t const& torrent_ids, tr_quark const key, QStringList const& val);
|
||||
|
||||
void torrentSetLocation(torrent_ids_t const& torrent_ids, QString const& path, bool do_move);
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
|
||||
using torrent_ids_t = std::unordered_set<tr_torrent_id_t>;
|
||||
|
||||
using file_indices_t = std::set<int>;
|
||||
|
|
|
@ -76,51 +76,44 @@ void WatchDir::setPath(QString const& path, bool is_enabled)
|
|||
|
||||
void WatchDir::watcherActivated(QString const& path)
|
||||
{
|
||||
auto const dir = QDir{ path };
|
||||
|
||||
// get the list of files currently in the watch directory
|
||||
QSet<QString> files;
|
||||
|
||||
for (QString const& str : dir.entryList(QDir::Readable | QDir::Files))
|
||||
{
|
||||
files.insert(str);
|
||||
}
|
||||
auto const dir = QDir{ path };
|
||||
auto const files = dir.entryList(QDir::Readable | QDir::Files);
|
||||
|
||||
// try to add any new files which end in torrent
|
||||
auto const new_files = files - watch_dir_files_;
|
||||
auto const torrent_suffix = QStringLiteral(".torrent");
|
||||
|
||||
for (QString const& name : new_files)
|
||||
for (auto const& name : files)
|
||||
{
|
||||
if (name.endsWith(torrent_suffix, Qt::CaseInsensitive))
|
||||
if (!name.endsWith(torrent_suffix, Qt::CaseInsensitive) || (watch_dir_files_.count(name) != 0U))
|
||||
{
|
||||
QString const filename = dir.absoluteFilePath(name);
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (metainfoTest(filename))
|
||||
auto const filename = dir.absoluteFilePath(name);
|
||||
switch (metainfoTest(filename))
|
||||
{
|
||||
case AddResult::Success:
|
||||
emit torrentFileAdded(filename);
|
||||
break;
|
||||
|
||||
case AddResult::Duplicate:
|
||||
break;
|
||||
|
||||
case AddResult::Error:
|
||||
{
|
||||
case AddResult::Success:
|
||||
emit torrentFileAdded(filename);
|
||||
break;
|
||||
|
||||
case AddResult::Duplicate:
|
||||
break;
|
||||
|
||||
case AddResult::Error:
|
||||
{
|
||||
// give the torrent a few seconds to finish downloading
|
||||
auto* t = new QTimer{ this };
|
||||
t->setObjectName(dir.absoluteFilePath(name));
|
||||
t->setSingleShot(true);
|
||||
connect(t, &QTimer::timeout, this, &WatchDir::onTimeout);
|
||||
t->start(5000);
|
||||
}
|
||||
// give the torrent a few seconds to finish downloading
|
||||
auto* t = new QTimer(this);
|
||||
t->setObjectName(dir.absoluteFilePath(name));
|
||||
t->setSingleShot(true);
|
||||
connect(t, &QTimer::timeout, this, &WatchDir::onTimeout);
|
||||
t->start(5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update our file list so that we can use it
|
||||
// for comparison the next time around
|
||||
watch_dir_files_ = files;
|
||||
watch_dir_files_ = { std::begin(files), std::end(files) };
|
||||
}
|
||||
|
||||
void WatchDir::rescanAllWatchedDirectories()
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <set>
|
||||
|
||||
#include <QObject>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QSet>
|
||||
#include <QString>
|
||||
|
||||
#include <libtransmission/tr-macros.h>
|
||||
|
@ -47,6 +47,6 @@ private:
|
|||
|
||||
TorrentModel const& model_;
|
||||
|
||||
QSet<QString> watch_dir_files_;
|
||||
std::set<QString> watch_dir_files_;
|
||||
std::unique_ptr<QFileSystemWatcher> watcher_;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue