From d63a8fd1db07b0cd0128165edb429418c3b5c393 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 18 May 2013 21:27:05 +0300 Subject: improve quitdialog class. --- src/gui/quitdialog.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp index 973883466..77bd26b8e 100644 --- a/src/gui/quitdialog.cpp +++ b/src/gui/quitdialog.cpp @@ -76,9 +76,7 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe): addKeyListener(this); ContainerPlacer placer = getPlacer(0, 0); - const State state = Client::getState(); - mNeedForceQuit = (state == STATE_CHOOSE_SERVER || state == STATE_CONNECT_SERVER || state == STATE_LOGIN || state == STATE_PRE_LOGIN || state == STATE_LOGIN_ATTEMPT @@ -124,7 +122,6 @@ QuitDialog::QuitDialog(QuitDialog **const pointerToMe): setLocationRelativeTo(getParent()); setVisible(true); soundManager.playGuiSound(SOUND_SHOW_WINDOW); -// enableVisibleSound(true); requestModalFocus(); mOkButton->requestFocus(); } @@ -133,7 +130,6 @@ QuitDialog::~QuitDialog() { if (mMyPointer) *mMyPointer = nullptr; - // Optional widgets, so delete them by hand. delete mForceQuit; mForceQuit = nullptr; delete mLogoutQuit; @@ -233,7 +229,8 @@ void QuitDialog::keyPressed(gcn::KeyEvent &keyEvent) if (dir != 0) { std::vector::const_iterator it = mOptions.begin(); - std::vector::const_iterator it_end = mOptions.end(); + const std::vector::const_iterator + it_end = mOptions.end(); for (; it < it_end; ++it) { -- cgit v1.2.3-60-g2f50