Browse Source

Use an appropriate method to show modal dialog

PR #16809.
adaptive-webui-19844
Vladimir Golovnev 3 years ago committed by GitHub
parent
commit
4efece4ab8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/gui/mainwindow.cpp
  2. 3
      src/gui/transferlistwidget.cpp

3
src/gui/mainwindow.cpp

@ -971,7 +971,6 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::Torrent *co @@ -971,7 +971,6 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::Torrent *co
, tr("The torrent '%1' contains torrent files, do you want to proceed with their download?").arg(torrent->name())
, QMessageBox::NoButton, this);
confirmBox->setAttribute(Qt::WA_DeleteOnClose);
confirmBox->setModal(true);
const QPushButton *yes = confirmBox->addButton(tr("Yes"), QMessageBox::YesRole);
/*QPushButton *no = */ confirmBox->addButton(tr("No"), QMessageBox::NoRole);
@ -983,7 +982,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::Torrent *co @@ -983,7 +982,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::Torrent *co
if (button == never)
Preferences::instance()->disableRecursiveDownload();
});
confirmBox->show();
confirmBox->open();
}
void MainWindow::handleDownloadFromUrlFailure(const QString &url, const QString &reason) const

3
src/gui/transferlistwidget.cpp

@ -333,7 +333,6 @@ void TransferListWidget::setSelectedTorrentsLocation() @@ -333,7 +333,6 @@ void TransferListWidget::setSelectedTorrentsLocation()
auto fileDialog = new QFileDialog(this, tr("Choose save path"), oldLocation.data());
fileDialog->setAttribute(Qt::WA_DeleteOnClose);
fileDialog->setFileMode(QFileDialog::Directory);
fileDialog->setModal(true);
fileDialog->setOptions(QFileDialog::DontConfirmOverwrite | QFileDialog::ShowDirsOnly | QFileDialog::HideNameFilterDetails);
connect(fileDialog, &QDialog::accepted, this, [this, fileDialog]()
{
@ -353,7 +352,7 @@ void TransferListWidget::setSelectedTorrentsLocation() @@ -353,7 +352,7 @@ void TransferListWidget::setSelectedTorrentsLocation()
}
});
fileDialog->show();
fileDialog->open();
}
void TransferListWidget::pauseAllTorrents()

Loading…
Cancel
Save