summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-30 00:53:40 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-30 00:53:40 +0300
commitf29616d8d1309ee135afe2b2e7baf1d91d677a95 (patch)
tree77624591a88075bc2b1128520d950c717d353288 /src/gui/widgets
parentec51be4fd71babf30a73332bc4b73edb994ee462 (diff)
downloadplus-f29616d8d1309ee135afe2b2e7baf1d91d677a95.tar.gz
plus-f29616d8d1309ee135afe2b2e7baf1d91d677a95.tar.bz2
plus-f29616d8d1309ee135afe2b2e7baf1d91d677a95.tar.xz
plus-f29616d8d1309ee135afe2b2e7baf1d91d677a95.zip
Convert MouseButton enum into strong typed enum.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/avatarlistbox.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp4
-rw-r--r--src/gui/widgets/virtshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/window.cpp2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/widgets/avatarlistbox.cpp b/src/gui/widgets/avatarlistbox.cpp
index a3c29a68a..a7d060b10 100644
--- a/src/gui/widgets/avatarlistbox.cpp
+++ b/src/gui/widgets/avatarlistbox.cpp
@@ -608,7 +608,7 @@ void AvatarListBox::mousePressed(MouseEvent &event)
ava->getType());
event.consume();
- const unsigned int eventButton = event.getButton();
+ const MouseButtonT eventButton = event.getButton();
if (eventButton == MouseButton::LEFT)
{
if (type == MapItemType::EMPTY)
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index db5caf6f7..f46d0f282 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -399,7 +399,7 @@ void DropDown::mouseReleased(MouseEvent &event)
if (mIsDragged)
mPushed = false;
- const MouseButton::Type button = event.getButton();
+ const MouseButtonT button = event.getButton();
const int x = event.getX();
const int y = event.getY();
// Released outside of widget. Can happen when we have modal
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 9024f74be..ff20e024e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -400,7 +400,7 @@ void ItemContainer::mousePressed(MouseEvent &event)
if (!mInventory)
return;
- const MouseButton::Type button = event.getButton();
+ const MouseButtonT button = event.getButton();
mClicks = event.getClickCount();
if (button == MouseButton::LEFT || button == MouseButton::RIGHT)
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index 70b4e19e5..9953d0e6b 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -62,7 +62,7 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
std::string url = link;
replaceAll(url, " ", "");
listener.url = url;
- const MouseButton::Type button = event->getButton();
+ const MouseButtonT button = event->getButton();
if (button == MouseButton::LEFT)
{
ConfirmDialog *const confirmDlg = new ConfirmDialog(
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 7971e0d33..796964801 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -219,7 +219,7 @@ void SpellShortcutContainer::mousePressed(MouseEvent &event)
if (index == -1)
return;
- const MouseButton::Type eventButton = event.getButton();
+ const MouseButtonT eventButton = event.getButton();
if (eventButton == MouseButton::LEFT)
{
const int itemId = getItemByIndex(index);
@@ -255,7 +255,7 @@ void SpellShortcutContainer::mouseReleased(MouseEvent &event)
}
const int itemId = getItemByIndex(index);
- const MouseButton::Type eventButton = event.getButton();
+ const MouseButtonT eventButton = event.getButton();
if (eventButton == MouseButton::LEFT)
{
diff --git a/src/gui/widgets/virtshortcutcontainer.cpp b/src/gui/widgets/virtshortcutcontainer.cpp
index 30dbe3770..44ea247cc 100644
--- a/src/gui/widgets/virtshortcutcontainer.cpp
+++ b/src/gui/widgets/virtshortcutcontainer.cpp
@@ -269,7 +269,7 @@ void VirtShortcutContainer::mousePressed(MouseEvent &event)
event.consume();
- const MouseButton::Type eventButton = event.getButton();
+ const MouseButtonT eventButton = event.getButton();
if (eventButton == MouseButton::LEFT)
{
if (mShortcut->getItem(index) > 0)
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index a48b2c062..2187056f9 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -810,7 +810,7 @@ void Window::mousePressed(MouseEvent &event)
mMoved = event.getY() <= static_cast<int>(mTitleBarHeight);
}
- const MouseButton::Type button = event.getButton();
+ const MouseButtonT button = event.getButton();
if (button == MouseButton::LEFT)
{
const int x = event.getX();