From 2df5b93608c98297e75b2bec8cd494e6bba5a23a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Oct 2013 11:28:03 +0300 Subject: move virtual member calls from spellpopup constuctor into postInit. --- src/gui/popups/spellpopup.cpp | 3 +++ src/gui/popups/spellpopup.h | 2 ++ src/gui/widgets/itemshortcutcontainer.cpp | 1 + src/gui/widgets/spellshortcutcontainer.cpp | 2 ++ 4 files changed, 8 insertions(+) (limited to 'src/gui') diff --git a/src/gui/popups/spellpopup.cpp b/src/gui/popups/spellpopup.cpp index 5db8ceafb..b522f0d0a 100644 --- a/src/gui/popups/spellpopup.cpp +++ b/src/gui/popups/spellpopup.cpp @@ -39,7 +39,10 @@ SpellPopup::SpellPopup(): getThemeColor(Theme::POPUP_OUTLINE)); mItemComment->setForegroundColorAll(getThemeColor(Theme::POPUP), getThemeColor(Theme::POPUP_OUTLINE)); +} +void SpellPopup::postInit() +{ add(mItemName); add(mItemComment); diff --git a/src/gui/popups/spellpopup.h b/src/gui/popups/spellpopup.h index abd542461..9c059c954 100644 --- a/src/gui/popups/spellpopup.h +++ b/src/gui/popups/spellpopup.h @@ -48,6 +48,8 @@ class SpellPopup final : public Popup */ ~SpellPopup(); + void postInit() override; + /** * Sets the info to be displayed given a particular item. */ diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index d85a1e73e..266c96241 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -61,6 +61,7 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) : mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)) { mItemPopup->postInit(); + mSpellPopup->postInit(); addMouseListener(this); addWidgetListener(this); diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index 6e1db9cbd..3a28bfabf 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -46,6 +46,8 @@ SpellShortcutContainer::SpellShortcutContainer(const unsigned number) : mNumber(number), mSpellClicked(false) { + mSpellPopup->postInit(); + addMouseListener(this); addWidgetListener(this); -- cgit v1.2.3-60-g2f50