mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Start up torrents after UI was created. Fixes #6454.
Commit dd0537d
changed torrents startup code adding alerts processing
into it. Therefore alerts were processed before UI code subscribed to
signals and therefore part of alerts was not reflected in the UI.
Thus here we do not start torrents in Session constructor, but do that
from Application::exec() after UI was constructed and is ready to process
signals.
This commit is contained in:
parent
ef08b4269d
commit
b8eee9e1b8
3 changed files with 4 additions and 2 deletions
|
@ -441,6 +441,9 @@ int Application::exec(const QStringList ¶ms)
|
|||
m_paramsQueue.clear();
|
||||
}
|
||||
|
||||
// Now UI is ready to process signals from Session
|
||||
BitTorrent::Session::instance()->startUpTorrents();
|
||||
|
||||
return BaseApplication::exec();
|
||||
}
|
||||
|
||||
|
|
|
@ -425,7 +425,6 @@ Session::Session(QObject *parent)
|
|||
Net::PortForwarder::initInstance(m_nativeSession);
|
||||
|
||||
qDebug("* BitTorrent Session constructed");
|
||||
startUpTorrents();
|
||||
}
|
||||
|
||||
bool Session::isDHTEnabled() const
|
||||
|
|
|
@ -327,6 +327,7 @@ namespace BitTorrent
|
|||
bool isTrackerFilteringEnabled() const;
|
||||
void setTrackerFilteringEnabled(bool enabled);
|
||||
|
||||
void startUpTorrents();
|
||||
TorrentHandle *findTorrent(const InfoHash &hash) const;
|
||||
QHash<InfoHash, TorrentHandle *> torrents() const;
|
||||
TorrentStatusReport torrentStatusReport() const;
|
||||
|
@ -457,7 +458,6 @@ namespace BitTorrent
|
|||
void enableIPFilter();
|
||||
void disableIPFilter();
|
||||
|
||||
void startUpTorrents();
|
||||
bool addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri,
|
||||
TorrentInfo torrentInfo = TorrentInfo(),
|
||||
const QByteArray &fastresumeData = QByteArray());
|
||||
|
|
Loading…
Reference in a new issue