diff options
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/buyselldialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charcreatedialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 12 | ||||
-rw-r--r-- | src/gui/windows/chatwindow.cpp | 1 | ||||
-rw-r--r-- | src/gui/windows/editserverdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.h | 3 | ||||
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/logindialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/quitdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/registerdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/windows/updaterwindow.cpp | 2 |
14 files changed, 9 insertions, 31 deletions
diff --git a/src/gui/windows/buyselldialog.cpp b/src/gui/windows/buyselldialog.cpp index 2de5841bc..eacd952bd 100644 --- a/src/gui/windows/buyselldialog.cpp +++ b/src/gui/windows/buyselldialog.cpp @@ -65,7 +65,7 @@ void BuySellDialog::init() if (setupWindow) setupWindow->registerWindowForReset(this); - static const char *buttonNames[] = + static const char *const buttonNames[] = { // TRANSLATORS: shop window button N_("Buy"), diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp index b34f8f50a..05dfb2171 100644 --- a/src/gui/windows/charcreatedialog.cpp +++ b/src/gui/windows/charcreatedialog.cpp @@ -24,8 +24,6 @@ #include "main.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "gui/dialogtype.h" diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index 5ec3ab2b7..fef43b605 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -26,8 +26,6 @@ #include "configuration.h" #include "units.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "being/attributes.h" @@ -234,7 +232,7 @@ void CharSelectDialog::action(const ActionEvent &event) else if (eventId == "rename" && mCharacterEntries[selected]->getCharacter()) { - LocalPlayer *const player = mCharacterEntries[ + const LocalPlayer *const player = mCharacterEntries[ selected]->getCharacter()->dummy; EditDialog *const dialog = new EditDialog( _("Please enter new name"), player->getName(), "OK"); @@ -525,8 +523,7 @@ void CharSelectDialog::setLocked(const bool locked) mUnregisterButton->setEnabled(!locked); if (mChangeEmailButton) mChangeEmailButton->setEnabled(!locked); - if (mPlayButton) - mPlayButton->setEnabled(!locked); + mPlayButton->setEnabled(!locked); if (mDeleteButton) mDeleteButton->setEnabled(!locked); @@ -575,8 +572,7 @@ void CharSelectDialog::close() void CharSelectDialog::widgetResized(const Event &event) { Window::widgetResized(event); - if (mCharacterView) - mCharacterView->resize(); + mCharacterView->resize(); } void CharSelectDialog::updateState() @@ -594,7 +590,7 @@ void CharSelectDialog::updateState() // TRANSLATORS: char select dialog. button. mPlayButton->setCaption(_("Play")); - LocalPlayer *const player = mCharacterEntries[ + const LocalPlayer *const player = mCharacterEntries[ idx]->getCharacter()->dummy; if (player && mRenameButton) mRenameButton->setEnabled(player->getRename() ? true : false); diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 559c87704..da64f195d 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -67,7 +67,6 @@ #include "render/opengldebug.h" #include "net/chathandler.h" -#include "net/playerhandler.h" #include "utils/copynpaste.h" #include "utils/delete2.h" diff --git a/src/gui/windows/editserverdialog.cpp b/src/gui/windows/editserverdialog.cpp index 5e5997985..6d06bba08 100644 --- a/src/gui/windows/editserverdialog.cpp +++ b/src/gui/windows/editserverdialog.cpp @@ -21,8 +21,6 @@ #include "gui/windows/editserverdialog.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "gui/dialogtype.h" diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index 76863ffbd..08c6aea51 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -773,5 +773,5 @@ int EquipmentWindow::addPage(const std::string &name) boxes.push_back(nullptr); mTabs->addButton(name); - return mPages.size() - 1; + return static_cast<int>(mPages.size()) - 1; } diff --git a/src/gui/windows/equipmentwindow.h b/src/gui/windows/equipmentwindow.h index 628b2fdbe..8c77b6d28 100644 --- a/src/gui/windows/equipmentwindow.h +++ b/src/gui/windows/equipmentwindow.h @@ -26,7 +26,6 @@ #include "equipment.h" #include "localconsts.h" -#include "gui/widgets/equipmentpage.h" #include "gui/widgets/window.h" #include "utils/xml.h" @@ -43,7 +42,7 @@ class Item; class PlayerBox; class TabStrip; -struct EquipmentBox; +struct EquipmentPage; /** * Equipment dialog. diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 390b0400b..c1fea4158 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -29,8 +29,6 @@ #include "being/attributes.h" #include "being/playerinfo.h" -#include "events/keyevent.h" - #include "input/inputmanager.h" #include "gui/gui.h" diff --git a/src/gui/windows/logindialog.cpp b/src/gui/windows/logindialog.cpp index 8f6256616..41cf22f17 100644 --- a/src/gui/windows/logindialog.cpp +++ b/src/gui/windows/logindialog.cpp @@ -25,8 +25,6 @@ #include "client.h" #include "configuration.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "listeners/openurllistener.h" diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index 40d4c1124..adcd1c9d2 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -121,8 +121,7 @@ MiniStatusWindow::MiniStatusWindow() : if (gameHandler->canUseMagicBar() && statusWindow) statusWindow->updateMPBar(mMpBar); - const int job = Attributes::JOB - && serverConfig.getValueBool("showJob", true); + const bool job = serverConfig.getValueBool("showJob", true); StatusWindow::updateXPBar(mXpBar); diff --git a/src/gui/windows/quitdialog.cpp b/src/gui/windows/quitdialog.cpp index c5cd311a3..67020a47d 100644 --- a/src/gui/windows/quitdialog.cpp +++ b/src/gui/windows/quitdialog.cpp @@ -27,8 +27,6 @@ #include "soundconsts.h" #include "soundmanager.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "gui/dialogsmanager.h" diff --git a/src/gui/windows/registerdialog.cpp b/src/gui/windows/registerdialog.cpp index 3b4ee0539..d09725e95 100644 --- a/src/gui/windows/registerdialog.cpp +++ b/src/gui/windows/registerdialog.cpp @@ -24,8 +24,6 @@ #include "client.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "listeners/wrongdatanoticelistener.h" diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index 227528b20..9d979f27f 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -128,8 +128,7 @@ StatusWindow::StatusWindow() : getThemeColor(Theme::XP_BAR_OUTLINE)); const bool magicBar = gameHandler->canUseMagicBar(); - const int job = Attributes::JOB - && serverConfig.getValueBool("showJob", true); + const bool job = serverConfig.getValueBool("showJob", true); if (magicBar) { diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp index 5dc0a7708..a12219c7a 100644 --- a/src/gui/windows/updaterwindow.cpp +++ b/src/gui/windows/updaterwindow.cpp @@ -26,8 +26,6 @@ #include "configuration.h" #include "settings.h" -#include "events/keyevent.h" - #include "input/inputaction.h" #include "gui/widgets/browserbox.h" |