diff options
| author | 2011-02-21 23:46:03 +0000 | |
|---|---|---|
| committer | 2011-02-21 23:46:03 +0000 | |
| commit | 3aa8783cf40bfb9e5759cee86bd734df645b153e (patch) | |
| tree | 695ee7b834045ccfb5b0b69fc21678a768a4d0a2 /src/modules/objects | |
| parent | Update the po files (diff) | |
| download | KVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.tar.gz KVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.tar.bz2 KVIrc-3aa8783cf40bfb9e5759cee86bd734df645b153e.zip | |
More memory leak hunting
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5501 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/objects')
| -rw-r--r-- | src/modules/objects/KvsObject_window.cpp | 5 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_window.h | 33 |
2 files changed, 21 insertions, 17 deletions
diff --git a/src/modules/objects/KvsObject_window.cpp b/src/modules/objects/KvsObject_window.cpp index 603c1bd04..f3b741481 100644 --- a/src/modules/objects/KvsObject_window.cpp +++ b/src/modules/objects/KvsObject_window.cpp @@ -113,12 +113,13 @@ KVSO_END_CONSTRUCTOR(KvsObject_window) KVSO_BEGIN_DESTRUCTOR(KvsObject_window) - + if(widget()) + g_pMainWindow->closeWindow(((KviKvsScriptWindowWindow *)widget())); KVSO_END_CONSTRUCTOR(KvsObject_window) bool KvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList *) { - KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),getName()); + KviKvsScriptWindowWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),getName()); setObject(w); pContext->window()->frame()->addWindow(w,false); w->minimize(); // must be minimized before children are added, otherwise the focus handling goes nuts... diff --git a/src/modules/objects/KvsObject_window.h b/src/modules/objects/KvsObject_window.h index 63468f434..b074f1e32 100644 --- a/src/modules/objects/KvsObject_window.h +++ b/src/modules/objects/KvsObject_window.h @@ -28,21 +28,6 @@ #include "KviWindow.h" #include "object_macros.h" -class KvsObject_window : public KvsObject_widget -{ -public: - KVSO_DECLARE_OBJECT(KvsObject_window) -public: - QWidget * widget() { return (QWidget *)object(); }; - -protected: - virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); - - bool setWindowTitle(KviKvsObjectFunctionCall *c); - bool setIcon(KviKvsObjectFunctionCall *c); - bool setCentralWidget(KviKvsObjectFunctionCall *c); - -}; class KviKvsScriptWindowWindow : public KviWindow @@ -70,4 +55,22 @@ protected slots: void centralWidgetDestroyed(); }; + +class KvsObject_window : public KvsObject_widget +{ +public: + KVSO_DECLARE_OBJECT(KvsObject_window) +public: + QWidget * widget() { return (QWidget *)object(); }; + +protected: + virtual bool init(KviKvsRunTimeContext * pContext,KviKvsVariantList *pParams); + + bool setWindowTitle(KviKvsObjectFunctionCall *c); + bool setIcon(KviKvsObjectFunctionCall *c); + bool setCentralWidget(KviKvsObjectFunctionCall *c); + +}; + + #endif // !_CLASS_WINDOW_H_ |
