From 284862cd31e253f827e51364147f2632cea5a8ca Mon Sep 17 00:00:00 2001 From: Aaron Rainbolt Date: Sun, 24 Mar 2024 20:43:56 -0500 Subject: [PATCH] no, I'd really like the prompt to ALWAYS load please :) --- debian/changelog | 7 +++++++ src/installerprompt.cpp | 14 +++++++++----- src/installerprompt.h | 1 + 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index cd10e2b..4060617 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +lubuntu-installer-prompt (24.04.4) noble; urgency=medium + + * Fix a race condition where a wired network connection could hang the + installer prompt during startup. + + -- Aaron Rainbolt Sun, 24 Mar 2024 20:40:48 -0500 + lubuntu-installer-prompt (24.04.3) noble; urgency=medium * Don't let people close modal windows so they don't accidentally confuse diff --git a/src/installerprompt.cpp b/src/installerprompt.cpp index c90faf1..6348134 100644 --- a/src/installerprompt.cpp +++ b/src/installerprompt.cpp @@ -44,8 +44,6 @@ InstallerPrompt::InstallerPrompt(QWidget *parent) cpd = new ConnectionProgressDialog(); - updateConnectionInfo(); - initLanguageComboBox(); connect(ui->tryLubuntu, &QPushButton::clicked, this, &InstallerPrompt::onTryClicked); @@ -65,6 +63,8 @@ InstallerPrompt::InstallerPrompt(QWidget *parent) QTimer *repeater = new QTimer(); connect(repeater, SIGNAL(timeout()), this, SLOT(updateConnectionInfo())); repeater->start(15000); + + updateConnectionInfo(); } InstallerPrompt::~InstallerPrompt() @@ -317,10 +317,14 @@ void InstallerPrompt::updateConnectionInfo() ui->networkComboBox->setCurrentIndex(connectedDevice); } - if (NetworkManager::status() == NetworkManager::Connecting) { - cpd->exec(); + if (!firstUpdateConnectionInfoCall) { + if (NetworkManager::status() == NetworkManager::Connecting) { + cpd->exec(); + } else { + cpd->done(0); + } } else { - cpd->done(0); + firstUpdateConnectionInfoCall = false; } } diff --git a/src/installerprompt.h b/src/installerprompt.h index 94b8d34..d25f329 100644 --- a/src/installerprompt.h +++ b/src/installerprompt.h @@ -44,6 +44,7 @@ private: QString wifiSsid; bool wifiWrongHandling = false; QMap languageLocaleMap; + bool firstUpdateConnectionInfoCall = true; void initLanguageComboBox(); QStringList getAvailableLanguages();