Load torrent from data directly

This commit is contained in:
Chocobo1
2019-02-13 22:41:38 +08:00
parent 78ab0e4ba9
commit 5c0d9b7eab
2 changed files with 41 additions and 39 deletions

View File

@@ -80,7 +80,7 @@ private slots:
void updateMetadata(const BitTorrent::TorrentInfo &info);
void handleDownloadFailed(const QString &url, const QString &reason);
void handleRedirectedToMagnet(const QString &url, const QString &magnetUri);
void handleDownloadFinished(const QString &url, const QString &filePath);
void handleDownloadFinished(const QString &url, const QByteArray &data);
void TMMChanged(int index);
void categoryChanged(int index);
void doNotDeleteTorrentClicked(bool checked);
@@ -90,7 +90,8 @@ private slots:
private:
explicit AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inParams, QWidget *parent);
bool loadTorrent(const QString &torrentPath);
bool loadTorrentFile(const QString &torrentPath);
bool loadTorrentImpl();
bool loadMagnet(const BitTorrent::MagnetUri &magnetUri);
void populateSavePathComboBox();
void saveSavePathHistory() const;
@@ -108,7 +109,6 @@ private:
TorrentContentFilterModel *m_contentModel;
PropListDelegate *m_contentDelegate;
bool m_hasMetadata;
QString m_filePath;
BitTorrent::InfoHash m_hash;
BitTorrent::TorrentInfo m_torrentInfo;
QByteArray m_headerState;