aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/window/UserWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/window/UserWindow.cpp')
-rw-r--r--src/modules/window/UserWindow.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/window/UserWindow.cpp b/src/modules/window/UserWindow.cpp
index 48d34c734..e1d7500ab 100644
--- a/src/modules/window/UserWindow.cpp
+++ b/src/modules/window/UserWindow.cpp
@@ -28,12 +28,15 @@
#include "KviMainWindow.h"
#include "KviConsoleWindow.h"
-extern KviPointerList<UserWindow> * g_pUserWindowList;
+#include <algorithm>
+#include <map>
+
+extern std::vector<UserWindow *> g_pUserWindowList;
UserWindow::UserWindow(const char * pcName, QString & szIcon, KviConsoleWindow * pConsole, int iCreationFlags)
: KviWindow(KviWindow::UserWindow, pcName, pConsole)
{
- g_pUserWindowList->append(this);
+ g_pUserWindowList.push_back(this);
m_szIcon = szIcon;
@@ -55,7 +58,7 @@ UserWindow::~UserWindow()
{
if(context())
context()->unregisterContextWindow(this);
- g_pUserWindowList->removeRef(this);
+ g_pUserWindowList.erase(std::remove(g_pUserWindowList.begin(), g_pUserWindowList.end(), this), g_pUserWindowList.end());
}
QPixmap * UserWindow::myIconPtr()