mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
Show the loaded torrents in the transferlist when qBT is launched with a torrent/magnet and the AddNewTorrentDialog is showing. Closes #1564.
This commit is contained in:
@@ -60,6 +60,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
|
||||
m_hasRenamedFile(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
ui->lblMetaLoading->setVisible(false);
|
||||
ui->progMetaLoading->setVisible(false);
|
||||
|
||||
@@ -120,18 +121,22 @@ void AddNewTorrentDialog::saveState()
|
||||
pref->setAddNewTorrentDialogExpanded(ui->adv_button->isChecked());
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::showTorrent(const QString &torrent_path, const QString& from_url)
|
||||
void AddNewTorrentDialog::showTorrent(const QString &torrent_path, const QString& from_url, QWidget *parent)
|
||||
{
|
||||
AddNewTorrentDialog dlg;
|
||||
if (dlg.loadTorrent(torrent_path, from_url))
|
||||
dlg.exec();
|
||||
AddNewTorrentDialog *dlg = new AddNewTorrentDialog(parent);
|
||||
if (dlg->loadTorrent(torrent_path, from_url))
|
||||
dlg->open();
|
||||
else
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::showMagnet(const QString& link)
|
||||
void AddNewTorrentDialog::showMagnet(const QString& link, QWidget *parent)
|
||||
{
|
||||
AddNewTorrentDialog dlg;
|
||||
if (dlg.loadMagnet(link))
|
||||
dlg.exec();
|
||||
AddNewTorrentDialog *dlg = new AddNewTorrentDialog(parent);
|
||||
if (dlg->loadMagnet(link))
|
||||
dlg->open();
|
||||
else
|
||||
delete dlg;
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::showEvent(QShowEvent *event) {
|
||||
|
||||
Reference in New Issue
Block a user