diff options
Diffstat (limited to 'ui/qt5/networkingpage.cc')
-rw-r--r-- | ui/qt5/networkingpage.cc | 16 |
1 files changed, 16 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; +} |