summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-19 11:56:17 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-19 15:12:22 +0300
commit4179da0ea3495768d00f2415089cab137bc1ec5e (patch)
tree7427bb1c4daece98fd7eb9c218938485991b549d
parent6e0cdf4f00b7d5fcfd6eaeca617c59fc22ce2034 (diff)
downloadplus-4179da0ea3495768d00f2415089cab137bc1ec5e.tar.gz
plus-4179da0ea3495768d00f2415089cab137bc1ec5e.tar.bz2
plus-4179da0ea3495768d00f2415089cab137bc1ec5e.tar.xz
plus-4179da0ea3495768d00f2415089cab137bc1ec5e.zip
move virtual member calls from statuspopup constuctor into postInit.
-rw-r--r--src/gui/popups/statuspopup.cpp8
-rw-r--r--src/gui/popups/statuspopup.h2
-rw-r--r--src/gui/windows/ministatuswindow.cpp1
3 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/popups/statuspopup.cpp b/src/gui/popups/statuspopup.cpp
index fb2b161c2..4b0361e2c 100644
--- a/src/gui/popups/statuspopup.cpp
+++ b/src/gui/popups/statuspopup.cpp
@@ -50,12 +50,14 @@
StatusPopup::StatusPopup() :
Popup("StatusPopup", "statuspopup.xml")
{
- const int fontHeight = getFont()->getHeight();
-
for (int f = 0; f < STATUSPOPUP_NUM_LABELS; f ++)
mLabels[f] = new Label(this);
- int y = 0;
+}
+void StatusPopup::postInit()
+{
+ const int fontHeight = getFont()->getHeight();
+ int y = 0;
addLabel(0);
addLabel(1);
addLabel(2);
diff --git a/src/gui/popups/statuspopup.h b/src/gui/popups/statuspopup.h
index f7964741b..b8fb05f0e 100644
--- a/src/gui/popups/statuspopup.h
+++ b/src/gui/popups/statuspopup.h
@@ -45,6 +45,8 @@ class StatusPopup final : public Popup
A_DELETE_COPY(StatusPopup)
+ void postInit() override;
+
/**
* Destructor. Cleans up the item popup on deletion.
*/
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 2d64e9ffd..fe56a1f59 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -91,6 +91,7 @@ MiniStatusWindow::MiniStatusWindow() :
mTextPopup(new TextPopup),
mStatusPopup(new StatusPopup)
{
+ mStatusPopup->postInit();
listen(CHANNEL_ATTRIBUTES);
StatusWindow::updateHPBar(mHpBar);