mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
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:
parent
f5d7e76ac4
commit
ea55833979
1 changed files with 3 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue