Implement class for handling filesystem paths

PR #15915.
This commit is contained in:
Vladimir Golovnev
2022-02-08 06:03:48 +03:00
committed by GitHub
parent facfa26eed
commit dd1bd8ad10
131 changed files with 2252 additions and 1868 deletions

View File

@@ -33,6 +33,8 @@
#include <QString>
#include "base/path.h"
#ifdef QBT_USES_LIBTORRENT2
#include <libtorrent/disk_interface.hpp>
#include <libtorrent/file_storage.hpp>
@@ -86,13 +88,13 @@ public:
void settings_updated() override;
private:
void handleCompleteFiles(libtorrent::storage_index_t storage, const QString &savePath);
void handleCompleteFiles(libtorrent::storage_index_t storage, const Path &savePath);
std::unique_ptr<lt::disk_interface> m_nativeDiskIO;
struct StorageData
{
QString savePath;
Path savePath;
lt::file_storage files;
lt::aux::vector<lt::download_priority_t, lt::file_index_t> filePriorities;
};
@@ -113,9 +115,9 @@ public:
lt::status_t move_storage(const std::string &savePath, lt::move_flags_t flags, lt::storage_error &ec) override;
private:
void handleCompleteFiles(const QString &savePath);
void handleCompleteFiles(const Path &savePath);
lt::aux::vector<lt::download_priority_t, lt::file_index_t> m_filePriorities;
QString m_savePath;
Path m_savePath;
};
#endif