summaryrefslogtreecommitdiff
path: root/src/gui/editserverdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-27 01:27:11 +0300
commitde476bb95242e10c833394ef007728072eabe60f (patch)
tree033747127a7ea4e36de42cfc99fcee56ce915bbb /src/gui/editserverdialog.cpp
parenta33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 (diff)
downloadplus-de476bb95242e10c833394ef007728072eabe60f.tar.gz
plus-de476bb95242e10c833394ef007728072eabe60f.tar.bz2
plus-de476bb95242e10c833394ef007728072eabe60f.tar.xz
plus-de476bb95242e10c833394ef007728072eabe60f.zip
Add const to more classes.
Diffstat (limited to 'src/gui/editserverdialog.cpp')
-rw-r--r--src/gui/editserverdialog.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/gui/editserverdialog.cpp b/src/gui/editserverdialog.cpp
index 9701e2b3d..15f4b8ac8 100644
--- a/src/gui/editserverdialog.cpp
+++ b/src/gui/editserverdialog.cpp
@@ -60,8 +60,9 @@ std::string TypeListModel::getElementAt(int elementIndex)
return "Unknown";
}
-EditServerDialog::EditServerDialog(ServerDialog *parent, ServerInfo server,
- int index) :
+EditServerDialog::EditServerDialog(ServerDialog *const parent,
+ ServerInfo server,
+ const int index) :
Window(_("Edit Server"), true, parent),
mServerDialog(parent),
mServer(server),
@@ -69,11 +70,11 @@ EditServerDialog::EditServerDialog(ServerDialog *parent, ServerInfo server,
{
setWindowName("EditServerDialog");
- Label *nameLabel = new Label(_("Name:"));
- Label *serverAdressLabel = new Label(_("Address:"));
- Label *portLabel = new Label(_("Port:"));
- Label *typeLabel = new Label(_("Server type:"));
- Label *descriptionLabel = new Label(_("Description:"));
+ Label *const nameLabel = new Label(_("Name:"));
+ Label *const serverAdressLabel = new Label(_("Address:"));
+ Label *const portLabel = new Label(_("Port:"));
+ Label *const typeLabel = new Label(_("Server type:"));
+ Label *const descriptionLabel = new Label(_("Description:"));
mServerAddressField = new TextField(std::string());
mPortField = new TextField(std::string());
mPortField->setNumeric(true);
@@ -200,7 +201,7 @@ void EditServerDialog::action(const gcn::ActionEvent &event)
if (mServerAddressField->getText().empty()
|| mPortField->getText().empty())
{
- OkDialog *dlg = new OkDialog(_("Error"),
+ OkDialog *const dlg = new OkDialog(_("Error"),
_("Please at least type both the address and the port "
"of the server."), DIALOG_ERROR);
dlg->addActionListener(this);