mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 06:01:33 -06: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:
@@ -462,6 +462,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();
|
||||
}
|
||||
|
||||
|
||||
@@ -440,7 +440,6 @@ Session::Session(QObject *parent)
|
||||
Net::PortForwarder::initInstance(m_nativeSession);
|
||||
|
||||
qDebug("* BitTorrent Session constructed");
|
||||
startUpTorrents();
|
||||
}
|
||||
|
||||
bool Session::isDHTEnabled() const
|
||||
|
||||
@@ -330,6 +330,7 @@ namespace BitTorrent
|
||||
QStringList bannedIPs() const;
|
||||
void setBannedIPs(const QStringList &list);
|
||||
|
||||
void startUpTorrents();
|
||||
TorrentHandle *findTorrent(const InfoHash &hash) const;
|
||||
QHash<InfoHash, TorrentHandle *> torrents() const;
|
||||
TorrentStatusReport torrentStatusReport() const;
|
||||
@@ -460,7 +461,6 @@ namespace BitTorrent
|
||||
void enableIPFilter();
|
||||
void disableIPFilter();
|
||||
|
||||
void startUpTorrents();
|
||||
bool addTorrent_impl(AddTorrentData addData, const MagnetUri &magnetUri,
|
||||
TorrentInfo torrentInfo = TorrentInfo(),
|
||||
const QByteArray &fastresumeData = QByteArray());
|
||||
|
||||
Reference in New Issue
Block a user