diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-09-25 01:39:13 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-09-25 01:39:13 -0500 |
commit | 56c745993be1bc9cd42a6eaaaf1486e3156018ad (patch) | |
tree | f4e73106913466b99c0576eaaf3b5e1ffa4d43f4 | |
parent | d6d057a50b097afcc0655517bb493dbc9045e646 (diff) | |
download | horizon-56c745993be1bc9cd42a6eaaaf1486e3156018ad.tar.gz horizon-56c745993be1bc9cd42a6eaaaf1486e3156018ad.tar.bz2 horizon-56c745993be1bc9cd42a6eaaaf1486e3156018ad.tar.xz horizon-56c745993be1bc9cd42a6eaaaf1486e3156018ad.zip |
Qt UI: Fix last remaining papercuts for Mac client
-rw-r--r-- | ui/qt5/netdhcppage.cc | 10 | ||||
-rw-r--r-- | ui/qt5/netdhcppage.hh | 3 | ||||
-rw-r--r-- | ui/qt5/partitionmountpage.hh | 5 |
3 files changed, 11 insertions, 7 deletions
diff --git a/ui/qt5/netdhcppage.cc b/ui/qt5/netdhcppage.cc index 64dae35..72061c9 100644 --- a/ui/qt5/netdhcppage.cc +++ b/ui/qt5/netdhcppage.cc @@ -16,7 +16,6 @@ #include <assert.h> #include <QGridLayout> #include <QGuiApplication> -#include <QProcess> #include <QUrl> #include <QVBoxLayout> @@ -74,13 +73,14 @@ void NetDHCPPage::startDHCP() { logButton->setHidden(false); } }); - connect(dhcpcd, static_cast<void (QProcess:: *)(int)>(&QProcess::finished), - this, &NetDHCPPage::dhcpFinished); + connect(dhcpcd, static_cast<void (QProcess:: *)(int, QProcess::ExitStatus)>( + &QProcess::finished + ), this, &NetDHCPPage::dhcpFinished); dhcpcd->start(); } -void NetDHCPPage::dhcpFinished(int exitcode) { - if(exitcode != 0) { +void NetDHCPPage::dhcpFinished(int exitcode, QProcess::ExitStatus status) { + if(status != QProcess::NormalExit || exitcode != 0) { progress->setStepStatus(0, StepProgressWidget::Failed); information->setText(tr("The system could not obtain an address.")); logButton->setHidden(false); diff --git a/ui/qt5/netdhcppage.hh b/ui/qt5/netdhcppage.hh index 84aaff6..8921433 100644 --- a/ui/qt5/netdhcppage.hh +++ b/ui/qt5/netdhcppage.hh @@ -19,6 +19,7 @@ #include <QLabel> #include <QNetworkAccessManager> #include <QNetworkReply> +#include <QProcess> #include <QPushButton> class NetDHCPPage : public HorizonWizardPage { @@ -39,7 +40,7 @@ private: bool online = false; void startDHCP(); - void dhcpFinished(int exitcode); + void dhcpFinished(int exitcode, QProcess::ExitStatus status); void checkInet(); void inetFinished(); }; diff --git a/ui/qt5/partitionmountpage.hh b/ui/qt5/partitionmountpage.hh index d9a4939..0289e59 100644 --- a/ui/qt5/partitionmountpage.hh +++ b/ui/qt5/partitionmountpage.hh @@ -25,7 +25,10 @@ public: QStringList mountLines() const; private: QListWidget *mountList; - QPushButton *addMountButton, *delMountButton, *rescanButton; + QPushButton *addMountButton, *delMountButton; +#ifdef HAS_INSTALL_ENV + QPushButton *rescanButton; +#endif /* !HAS_INSTALL_ENV */ }; #endif /* !PARTITIONMOUNTPAGE_HH */ |