diff options
Diffstat (limited to 'ui/qt5')
-rw-r--r-- | ui/qt5/networkingpage.cc | 16 | ||||
-rw-r--r-- | ui/qt5/networkingpage.hh | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc index d7b5ced..c00f18f 100644 --- a/ui/qt5/networkingpage.cc +++ b/ui/qt5/networkingpage.cc @@ -12,6 +12,7 @@ #include "networkingpage.hh" #include "horizonwizard.hh" +#include "netdhcppage.hh" #ifdef HAS_INSTALL_ENV # include <QDir> @@ -154,3 +155,18 @@ int NetworkingPage::nextId() const { return HorizonWizard::Page_DateTime; } } + +bool NetworkingPage::validatePage() { +#ifdef HAS_INSTALL_ENV + /* What a hack! + * + * Independent Pages means the DHCP page is never cleaned, even when Back + * is chosen. So, we have to do it from here. Note that it isn't enough + * to do it from NetworkIfacePage, because if only we have one interface, + * that page will never be shown! + * REF: adelie/horizon#354 */ + horizonWizard()->removePage(HorizonWizard::Page_Network_DHCP); + horizonWizard()->setPage(HorizonWizard::Page_Network_DHCP, new NetDHCPPage); +#endif /* HAS_INSTALL_ENV */ + return true; +} diff --git a/ui/qt5/networkingpage.hh b/ui/qt5/networkingpage.hh index 7bd03cf..9462d63 100644 --- a/ui/qt5/networkingpage.hh +++ b/ui/qt5/networkingpage.hh @@ -25,6 +25,7 @@ public: void initializePage() override; bool isComplete() const override; int nextId() const override; + bool validatePage() override; private: QButtonGroup *radioGroup; QRadioButton *simple, *advanced, *skip; |