summaryrefslogtreecommitdiff
path: root/ui/qt5/networkifacepage.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-15 14:36:03 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-11-15 14:36:03 -0600
commit5967de4afb4e00f136baab49cacd11b7f9b725bb (patch)
tree96b2c89aae3bded09c230b1a8d39973d746d6c71 /ui/qt5/networkifacepage.cc
parent77a4ad101732fa77ff7253bc6bda06c180a9fe2a (diff)
downloadhorizon-5967de4afb4e00f136baab49cacd11b7f9b725bb.tar.gz
horizon-5967de4afb4e00f136baab49cacd11b7f9b725bb.tar.bz2
horizon-5967de4afb4e00f136baab49cacd11b7f9b725bb.tar.xz
horizon-5967de4afb4e00f136baab49cacd11b7f9b725bb.zip
Qt UI: Add UI.Network.Automatic page and logic
Diffstat (limited to 'ui/qt5/networkifacepage.cc')
-rw-r--r--ui/qt5/networkifacepage.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/ui/qt5/networkifacepage.cc b/ui/qt5/networkifacepage.cc
index 4d292fb..3fbd6e5 100644
--- a/ui/qt5/networkifacepage.cc
+++ b/ui/qt5/networkifacepage.cc
@@ -12,6 +12,7 @@
#include "networkifacepage.hh"
#include "horizonwizard.hh"
+#include "netdhcppage.hh"
#include <algorithm>
#include <QDebug>
@@ -96,6 +97,16 @@ int NetworkIfacePage::nextId() const {
case HorizonWizard::Wireless:
return HorizonWizard::Page_Network_Wireless;
default:
- return HorizonWizard::Page_DateTime;
+ return HorizonWizard::Page_Network_DHCP;
}
}
+
+bool NetworkIfacePage::validatePage() {
+ /* 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. */
+ horizonWizard()->removePage(HorizonWizard::Page_Network_DHCP);
+ horizonWizard()->setPage(HorizonWizard::Page_Network_DHCP, new NetDHCPPage);
+ return true;
+}