Set dialog properties at the caller site

Redundant `setModal(true)` are removed since the dialog is already opened via `open()`.
This commit is contained in:
Chocobo1
2022-06-02 19:51:26 +08:00
parent ab0c82965c
commit 3fd0241abb
11 changed files with 30 additions and 32 deletions

View File

@@ -183,7 +183,6 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
{
// TODO: set dialog file properties using m_torrentParams.filePriorities
m_ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
m_ui->lblMetaLoading->setVisible(false);
m_ui->progMetaLoading->setVisible(false);
@@ -352,6 +351,7 @@ void AddNewTorrentDialog::saveState()
void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
{
auto *dlg = new AddNewTorrentDialog(inParams, parent);
dlg->setAttribute(Qt::WA_DeleteOnClose);
if (Net::DownloadManager::hasSupportedScheme(source))
{