summaryrefslogtreecommitdiff
path: root/src/gui/customserverdialog.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 17:26:44 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-02 17:27:39 +0100
commit72ceaaa426166bfa425f519c2418a66872839e12 (patch)
tree1ce7253fc629d4df445b89b2f533899341f03fc5 /src/gui/customserverdialog.cpp
parent78d6d9352f66f41963207b04a999d94c17d67cf2 (diff)
downloadMana-72ceaaa426166bfa425f519c2418a66872839e12.tar.gz
Mana-72ceaaa426166bfa425f519c2418a66872839e12.tar.bz2
Mana-72ceaaa426166bfa425f519c2418a66872839e12.tar.xz
Mana-72ceaaa426166bfa425f519c2418a66872839e12.zip
Changed server type to "enum class"
Diffstat (limited to 'src/gui/customserverdialog.cpp')
-rw-r--r--src/gui/customserverdialog.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/customserverdialog.cpp b/src/gui/customserverdialog.cpp
index 455951ec..c4fadca9 100644
--- a/src/gui/customserverdialog.cpp
+++ b/src/gui/customserverdialog.cpp
@@ -128,7 +128,7 @@ CustomServerDialog::CustomServerDialog(ServerDialog *parent, int index):
mServerAddressField->setText(serverInfo.hostname);
mPortField->setText(toString(serverInfo.port));
#ifdef MANASERV_SUPPORT
- mTypeField->setSelected(serverInfo.type == ServerInfo::TMWATHENA ?
+ mTypeField->setSelected(serverInfo.type == ServerType::TMWATHENA ?
0 : 1);
#endif
}
@@ -180,16 +180,16 @@ void CustomServerDialog::action(const gcn::ActionEvent &event)
switch (mTypeField->getSelected())
{
case 0:
- serverInfo.type = ServerInfo::TMWATHENA;
+ serverInfo.type = ServerType::TMWATHENA;
break;
case 1:
- serverInfo.type = ServerInfo::MANASERV;
+ serverInfo.type = ServerType::MANASERV;
break;
default:
- serverInfo.type = ServerInfo::UNKNOWN;
+ serverInfo.type = ServerType::UNKNOWN;
}
#else
- serverInfo.type = ServerInfo::TMWATHENA;
+ serverInfo.type = ServerType::TMWATHENA;
#endif
if (mPortField->getText().empty())
serverInfo.port = ServerInfo::defaultPortForServerType(serverInfo.type);