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
887887 }
888888
889889 void Menu::goToDomain(const QString newDomain) {
890− if (NodeList::getInstance()->getDomainHostname() != newDomain) {
890+ if (NodeList::getInstance()->getDomainInfo().getHostname() != newDomain) {
891891
892892 // send a node kill request, indicating to other clients that they should play the "disappeared" effect
893893 Application::getInstance()->getAvatar()->sendKillAvatar();
894894
895895 // give our nodeList the new domain-server hostname
896− NodeList::getInstance()->setDomainHostname(newDomain);
896+ NodeList::getInstance()->getDomainInfo().setHostname(newDomain);
897897 }
898898 }
899899
900900 void Menu::goToDomain() {
901901
902− QString currentDomainHostname = NodeList::getInstance()->getDomainHostname();
902+ QString currentDomainHostname = NodeList::getInstance()->getDomainInfo().getHostname();
903903
904− if (NodeList::getInstance()->getDomainPort() != DEFAULT_DOMAIN_SERVER_PORT) {
904+ if (NodeList::getInstance()->getDomainInfo().getPort() != DEFAULT_DOMAIN_SERVER_PORT) {
905905 // 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()));
907907 }
908908
909909 QInputDialog domainDialog(Application::getInstance()->getWindow());