diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-22 19:01:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-23 18:22:20 +0300 |
commit | c44828b14dce7e00ca01791eecf2bc452ee4cb00 (patch) | |
tree | 99f48dd01f141b8e79254255788b80efaf8a0111 /src/gui/widgets/window.cpp | |
parent | 56b646e26907f2ecd81920729cfeab123c6fc1aa (diff) | |
download | manaverse-c44828b14dce7e00ca01791eecf2bc452ee4cb00.tar.gz manaverse-c44828b14dce7e00ca01791eecf2bc452ee4cb00.tar.bz2 manaverse-c44828b14dce7e00ca01791eecf2bc452ee4cb00.tar.xz manaverse-c44828b14dce7e00ca01791eecf2bc452ee4cb00.zip |
Add check in windows for posInit() calls.
If postInit() was not called show error in log.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index cd526db98..53bf92cc0 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -150,7 +150,8 @@ Window::Window(const std::string &caption, mStickyButton(false), mSticky(false), mStickyButtonLock(false), - mPlayVisibleSound(false) + mPlayVisibleSound(false), + mInit(false) { logger->log("Window::Window(\"%s\")", caption.c_str()); @@ -261,6 +262,11 @@ Window::~Window() mGrip->decRef(); mGrip = nullptr; } + if (!mInit) + { + logger->log("error: Window created without calling postInit(): " + + mWindowName); + } } void Window::setWindowContainer(WindowContainer *const wc) |