History

add a DomainInfo class to hold domain information

Stephen Birarda committed 12 years ago

Commit 37f1f7b1 parent c9ade0511 files · +133 −100Browse files

Showing the changes to interface/src/Menu.cpp (1 of 11 files). Show all

Unified · Split

interface/src/Menu.cpp+5−5
@@ -887,23 +887,23 @@ void Menu::editPreferences() { · 886 unmodified lines
887}887}
888 888
889void Menu::goToDomain(const QString newDomain) {889void Menu::goToDomain(const QString newDomain) {
890 if (NodeList::getInstance()->getDomainHostname() != newDomain) {890 if (NodeList::getInstance()->getDomainInfo().getHostname() != newDomain) {
891 891
892 // send a node kill request, indicating to other clients that they should play the "disappeared" effect892 // send a node kill request, indicating to other clients that they should play the "disappeared" effect
893 Application::getInstance()->getAvatar()->sendKillAvatar();893 Application::getInstance()->getAvatar()->sendKillAvatar();
894 894
895 // give our nodeList the new domain-server hostname895 // give our nodeList the new domain-server hostname
896 NodeList::getInstance()->setDomainHostname(newDomain);896 NodeList::getInstance()->getDomainInfo().setHostname(newDomain);
897 }897 }
898}898}
899 899
900void Menu::goToDomain() {900void Menu::goToDomain() {
901 901
902 QString currentDomainHostname = NodeList::getInstance()->getDomainHostname();902 QString currentDomainHostname = NodeList::getInstance()->getDomainInfo().getHostname();
903 903
904 if (NodeList::getInstance()->getDomainPort() != DEFAULT_DOMAIN_SERVER_PORT) {904 if (NodeList::getInstance()->getDomainInfo().getPort() != DEFAULT_DOMAIN_SERVER_PORT) {
905 // add the port to the currentDomainHostname string if it is custom905 // add the port to the currentDomainHostname string if it is custom
906 currentDomainHostname.append(QString(":%1").arg(NodeList::getInstance()->getDomainPort()));906 currentDomainHostname.append(QString(":%1").arg(NodeList::getInstance()->getDomainInfo().getPort()));
907 }907 }
908 908
909 QInputDialog domainDialog(Application::getInstance()->getWindow());909 QInputDialog domainDialog(Application::getInstance()->getWindow());