Skip to content
This repository was archived by the owner on Feb 27, 2023. It is now read-only.

Remove initialisation dialog box if network error #346

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ MainWindow::MainWindow(const QString &defaultDisplay, QSplashScreen *splash, QWi
{
_showAll = true;
}

_networkOK = true;
if (cmdline.contains("silentinstall"))
{
/* If silentinstall is specified, auto-install single image in /os */
Expand Down Expand Up @@ -1067,6 +1069,8 @@ void MainWindow::downloadListComplete()
{
if (_qpd)
_qpd->hide();
_networkOK = false;

QMessageBox::critical(this, tr("Download error"), tr("Error downloading distribution list from Internet"), QMessageBox::Close);
}
else
Expand Down Expand Up @@ -1518,7 +1522,7 @@ void MainWindow::hideDialogIfNoNetwork()
{
if (_qpd)
{
if (!isOnline())
if (!isOnline() || !_networkOK)
{
/* No network cable inserted */
_qpd->hide();
Expand Down
1 change: 1 addition & 0 deletions recovery/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class MainWindow : public QMainWindow
QSplashScreen *_splash;
QSettings *_settings;
bool _hasWifi;
bool _networkOK;
int _numInstalledOS;
QNetworkAccessManager *_netaccess;
int _neededMB, _availableMB, _numMetaFilesToDownload, _numIconsToDownload;
Expand Down