Browse Source

Merge pull request #6630 from evsh/fix-6454

Start up torrents after UI was created. Fixes #6454.
adaptive-webui-19844
sledgehammer999 8 years ago committed by GitHub
parent
commit
c27108c97a
  1. 3
      src/app/application.cpp
  2. 1
      src/base/bittorrent/session.cpp
  3. 2
      src/base/bittorrent/session.h

3
src/app/application.cpp

@ -462,6 +462,9 @@ int Application::exec(const QStringList &params)
m_paramsQueue.clear(); m_paramsQueue.clear();
} }
// Now UI is ready to process signals from Session
BitTorrent::Session::instance()->startUpTorrents();
return BaseApplication::exec(); return BaseApplication::exec();
} }

1
src/base/bittorrent/session.cpp

@ -441,7 +441,6 @@ Session::Session(QObject *parent)
Net::PortForwarder::initInstance(m_nativeSession); Net::PortForwarder::initInstance(m_nativeSession);
qDebug("* BitTorrent Session constructed"); qDebug("* BitTorrent Session constructed");
startUpTorrents();
} }
bool Session::isDHTEnabled() const bool Session::isDHTEnabled() const

2
src/base/bittorrent/session.h

@ -333,6 +333,7 @@ namespace BitTorrent
QStringList bannedIPs() const; QStringList bannedIPs() const;
void setBannedIPs(const QStringList &list); void setBannedIPs(const QStringList &list);
void startUpTorrents();
TorrentHandle *findTorrent(const InfoHash &hash) const; TorrentHandle *findTorrent(const InfoHash &hash) const;
QHash<InfoHash, TorrentHandle *> torrents() const; QHash<InfoHash, TorrentHandle *> torrents() const;
TorrentStatusReport torrentStatusReport() const; TorrentStatusReport torrentStatusReport() const;
@ -463,7 +464,6 @@ namespace BitTorrent
void enableIPFilter(); void enableIPFilter();
void disableIPFilter(); void disableIPFilter();
void startUpTorrents();
bool addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri, bool addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri,
TorrentInfo torrentInfo = TorrentInfo(), TorrentInfo torrentInfo = TorrentInfo(),
const QByteArray &fastresumeData = QByteArray()); const QByteArray &fastresumeData = QByteArray());

Loading…
Cancel
Save