summaryrefslogtreecommitdiff
path: root/src/gui/shortcutwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-28 01:59:04 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-28 01:59:04 +0300
commitc79403e1341ac533df1771b866d1f5cee15e12b5 (patch)
tree5bed6dfb44f7fce0432bd7a7a28d2d23db07ce80 /src/gui/shortcutwindow.cpp
parent7c79aa2b8e484319e3e511fa21db6d2448347024 (diff)
downloadmanaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.gz
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.bz2
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.tar.xz
manaplus-c79403e1341ac533df1771b866d1f5cee15e12b5.zip
Add const to more classes.
Diffstat (limited to 'src/gui/shortcutwindow.cpp')
-rw-r--r--src/gui/shortcutwindow.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/shortcutwindow.cpp b/src/gui/shortcutwindow.cpp
index 16e71e6b7..1c9525eeb 100644
--- a/src/gui/shortcutwindow.cpp
+++ b/src/gui/shortcutwindow.cpp
@@ -41,7 +41,7 @@ int ShortcutWindow::mBoxesWidth = 0;
class ShortcutTab : public Tab
{
public:
- ShortcutTab(std::string name, ShortcutContainer* content)
+ ShortcutTab(std::string name, ShortcutContainer *const content)
{
setCaption(name);
mContent = content;
@@ -51,7 +51,7 @@ class ShortcutTab : public Tab
};
ShortcutWindow::ShortcutWindow(const std::string &title,
- ShortcutContainer *content,
+ ShortcutContainer *const content,
std::string skinFile,
int width, int height) :
Window("Window", false, nullptr, skinFile)
@@ -101,7 +101,7 @@ ShortcutWindow::ShortcutWindow(const std::string &title,
}
ShortcutWindow::ShortcutWindow(const std::string &title, std::string skinFile,
- int width, int height) :
+ const int width, const int height) :
Window("Window", false, nullptr, skinFile)
{
setWindowName(title);
@@ -148,16 +148,16 @@ ShortcutWindow::~ShortcutWindow()
mItems = nullptr;
}
-void ShortcutWindow::addTab(std::string name, ShortcutContainer *content)
+void ShortcutWindow::addTab(std::string name, ShortcutContainer *const content)
{
- ScrollArea *scroll = new ScrollArea(content, false);
+ ScrollArea *const scroll = new ScrollArea(content, false);
scroll->setPosition(SCROLL_PADDING, SCROLL_PADDING);
scroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- Tab *tab = new ShortcutTab(name, content);
+ Tab *const tab = new ShortcutTab(name, content);
mTabs->addTab(tab, scroll);
}
-int ShortcutWindow::getTabIndex()
+int ShortcutWindow::getTabIndex() const
{
if (!mTabs)
return 0;
@@ -170,11 +170,11 @@ void ShortcutWindow::widgetHidden(const gcn::Event &event)
mItems->widgetHidden(event);
if (mTabs)
{
- ScrollArea *scroll = static_cast<ScrollArea*>(
+ ScrollArea *const scroll = static_cast<ScrollArea *const>(
mTabs->getCurrentWidget());
if (scroll)
{
- ShortcutContainer *content = static_cast<ShortcutContainer*>(
+ ShortcutContainer *const content = static_cast<ShortcutContainer*>(
scroll->getContent());
if (content)