mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Don't set parent of "Add new torrent dialog" on macOS
PR #19494. Closes #12849. Closes #12852. Closes #19072. --------- Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
This commit is contained in:
parent
d85ed84e83
commit
716aca17f8
1 changed files with 8 additions and 0 deletions
|
@ -489,7 +489,15 @@ void AddNewTorrentDialog::saveState()
|
||||||
|
|
||||||
void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
||||||
{
|
{
|
||||||
|
#ifndef Q_OS_MACOS
|
||||||
auto *dlg = new AddNewTorrentDialog(inParams, parent);
|
auto *dlg = new AddNewTorrentDialog(inParams, parent);
|
||||||
|
#else
|
||||||
|
// By not setting a parent to the "AddNewTorrentDialog", all those dialogs
|
||||||
|
// will be displayed on top and will not overlap with the main window.
|
||||||
|
auto *dlg = new AddNewTorrentDialog(inParams, nullptr);
|
||||||
|
// Qt::Window is required to avoid showing only two dialog on top (see #12852).
|
||||||
|
dlg->setWindowFlags(Qt::Window);
|
||||||
|
#endif
|
||||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
if (Net::DownloadManager::hasSupportedScheme(source))
|
if (Net::DownloadManager::hasSupportedScheme(source))
|
||||||
|
|
Loading…
Reference in a new issue