summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/widget.cpp6
-rw-r--r--src/gui/widgets/widget.h12
2 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index 023f4a035..414fb7a5a 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -428,17 +428,17 @@ bool Widget::isModalMouseInputFocused() const
return mFocusHandler->getModalMouseInputFocused() == this;
}
-const std::list<MouseListener*>& Widget::getMouseListeners()
+const std::list<MouseListener*> &Widget::getMouseListeners() const
{
return mMouseListeners;
}
-const std::list<KeyListener*>& Widget::getKeyListeners()
+const std::list<KeyListener*> &Widget::getKeyListeners() const
{
return mKeyListeners;
}
-const std::list<FocusListener*>& Widget::getFocusListeners()
+const std::list<FocusListener*> &Widget::getFocusListeners() const
{
return mFocusListeners;
}
diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h
index 840e7ce31..2cba39d33 100644
--- a/src/gui/widgets/widget.h
+++ b/src/gui/widgets/widget.h
@@ -857,8 +857,8 @@ class Widget notfinal : public Widget2
* @return The mouse listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<MouseListener*>& getMouseListeners()
- A_WARN_UNUSED;
+ const std::list<MouseListener*>& getMouseListeners() const
+ A_WARN_UNUSED;
/**
* Gets the key listeners of the widget.
@@ -866,8 +866,8 @@ class Widget notfinal : public Widget2
* @return The key listeners of the widget.
* @since 0.6.0
*/
- virtual const std::list<KeyListener*>& getKeyListeners()
- A_WARN_UNUSED;
+ const std::list<KeyListener*>& getKeyListeners() const
+ A_WARN_UNUSED;
/**
* Gets the focus listeners of the widget.
@@ -875,8 +875,8 @@ class Widget notfinal : public Widget2
* @return The focus listeners of the widget.
* @since 0.7.0
*/
- virtual const std::list<FocusListener*>& getFocusListeners()
- A_WARN_UNUSED;
+ const std::list<FocusListener*>& getFocusListeners() const
+ A_WARN_UNUSED;
/**
* Gets the area of the widget occupied by the widget's children.