summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-14 23:05:26 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-14 23:05:26 +0300
commitfc23b24f67b5c8dc6744df01fbb9b05aee93a70c (patch)
treea27cec2a2ae2d712bead95780e7356e4cf8fb453
parent26b43e7164214e8c9e5cdb8842a79a4fcc1493da (diff)
downloadplus-fc23b24f67b5c8dc6744df01fbb9b05aee93a70c.tar.gz
plus-fc23b24f67b5c8dc6744df01fbb9b05aee93a70c.tar.bz2
plus-fc23b24f67b5c8dc6744df01fbb9b05aee93a70c.tar.xz
plus-fc23b24f67b5c8dc6744df01fbb9b05aee93a70c.zip
Remove default parameters from item popup.
-rw-r--r--src/gui/popups/itempopup.h9
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/shoplistbox.cpp2
-rw-r--r--src/gui/widgets/virtshortcutcontainer.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/itemamountwindow.cpp2
8 files changed, 13 insertions, 10 deletions
diff --git a/src/gui/popups/itempopup.h b/src/gui/popups/itempopup.h
index 32ace3af3..4c63ff785 100644
--- a/src/gui/popups/itempopup.h
+++ b/src/gui/popups/itempopup.h
@@ -57,10 +57,13 @@ class ItemPopup final : public Popup
/**
* Sets the info to be displayed given a particular item.
*/
- void setItem(const ItemInfo &item, const unsigned char color,
- const bool showImage = false, int id = -1);
+ void setItem(const ItemInfo &item,
+ const unsigned char color,
+ const bool showImage,
+ int id);
- void setItem(const Item *const item, const bool showImage = false);
+ void setItem(const Item *const item,
+ const bool showImage);
void mouseMoved(MouseEvent &event) override final;
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 17c0d9cf1..9cfa0345d 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -684,7 +684,7 @@ void ItemContainer::mouseMoved(MouseEvent &event)
if (item && viewport)
{
- itemPopup->setItem(item);
+ itemPopup->setItem(item, false);
itemPopup->position(viewport->mMouseX, viewport->mMouseY);
}
else
diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp
index a9ffd3d7b..40ec08c33 100644
--- a/src/gui/widgets/itemlinkhandler.cpp
+++ b/src/gui/widgets/itemlinkhandler.cpp
@@ -118,7 +118,7 @@ void ItemLinkHandler::handleLink(const std::string &link, MouseEvent *event)
if (id > 0)
{
const ItemInfo &itemInfo = ItemDB::get(id);
- itemPopup->setItem(itemInfo, color, true);
+ itemPopup->setItem(itemInfo, color, true, -1);
if (itemPopup->isPopupVisible())
{
itemPopup->setVisible(Visible_false);
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index eba9fd848..689d967c8 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -556,7 +556,7 @@ void ItemShortcutContainer::mouseMoved(MouseEvent &event)
const Item *const item = inv->findItem(itemId, itemColor);
if (item && viewport)
{
- itemPopup->setItem(item);
+ itemPopup->setItem(item, false);
itemPopup->position(viewport->mMouseX, viewport->mMouseY);
}
else
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index 788a493a9..c8f1bd889 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -218,7 +218,7 @@ void ShopListBox::mouseMoved(MouseEvent &event)
const Item *const item = mShopItems->at(index);
if (item)
{
- itemPopup->setItem(item);
+ itemPopup->setItem(item, false);
itemPopup->position(viewport->mMouseX, viewport->mMouseY);
}
else
diff --git a/src/gui/widgets/virtshortcutcontainer.cpp b/src/gui/widgets/virtshortcutcontainer.cpp
index 2d72234a0..3c28f244f 100644
--- a/src/gui/widgets/virtshortcutcontainer.cpp
+++ b/src/gui/widgets/virtshortcutcontainer.cpp
@@ -360,7 +360,7 @@ void VirtShortcutContainer::mouseMoved(MouseEvent &event)
if (item && viewport)
{
- itemPopup->setItem(item);
+ itemPopup->setItem(item, false);
itemPopup->position(viewport->mMouseX, viewport->mMouseY);
}
else
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index 784a7d86c..53097802a 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -568,7 +568,7 @@ void EquipmentWindow::mouseMoved(MouseEvent &event)
if (item)
{
- itemPopup->setItem(item);
+ itemPopup->setItem(item, false);
itemPopup->position(x + getX(), y + getY());
}
else
diff --git a/src/gui/windows/itemamountwindow.cpp b/src/gui/windows/itemamountwindow.cpp
index 3a1892f00..b1c10f058 100644
--- a/src/gui/windows/itemamountwindow.cpp
+++ b/src/gui/windows/itemamountwindow.cpp
@@ -307,7 +307,7 @@ void ItemAmountWindow::mouseMoved(MouseEvent &event)
if (event.getSource() == mItemIcon)
{
- itemPopup->setItem(mItem);
+ itemPopup->setItem(mItem, false);
itemPopup->position(viewport->mMouseX, viewport->mMouseY);
}
}