Set active window as parent for NetworkJobFailedDialog. Fixed a UI bug where the network error dialog was showing up without a parent window link forcing it to slide underneath Please Wait... download progress dialog and lock up user interaction. Users had to kill the process when this bug occurred.

Signed-off-by: sinidiem <sinidie@proton.me>
This commit is contained in:
sinidiem 2026-05-27 19:51:09 -05:00
parent f5d7e76ac4
commit ea55833979

View file

@ -40,6 +40,7 @@
#include "net/NetRequest.h"
#include "tasks/ConcurrentTask.h"
#if defined(LAUNCHER_APPLICATION)
#include <QApplication>
#include "Application.h"
#include "settings/SettingsObject.h"
#include "ui/dialogs/NetworkJobFailedDialog.h"
@ -174,7 +175,8 @@ void NetJob::emitFailed(QString reason)
if (APPLICATION_DYN && m_ask_retry && m_manual_try < APPLICATION->settings()->get("NumberOfManualRetries").toInt() && isOnline()) {
m_manual_try++;
auto failed = getFailedActions();
auto dialog = new NetworkJobFailedDialog(objectName(), m_try, m_done.size(), failed.size(), nullptr);
QWidget* activeWindow = QApplication::activeWindow();
auto dialog = new NetworkJobFailedDialog(objectName(), m_try, m_done.size(), failed.size(), activeWindow);
dialog->setAttribute(Qt::WA_DeleteOnClose);
for (const auto& request : failed) {