diff --git a/launcher/net/NetJob.cpp b/launcher/net/NetJob.cpp index 3dd1c09cf..17b67e534 100644 --- a/launcher/net/NetJob.cpp +++ b/launcher/net/NetJob.cpp @@ -40,6 +40,7 @@ #include "net/NetRequest.h" #include "tasks/ConcurrentTask.h" #if defined(LAUNCHER_APPLICATION) +#include #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) {