From e5d88e68d49f961be9edd1ee1a390c6b0fb88094 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Janne=20=C3=84n=C3=A4kk=C3=A4l=C3=A4?= Date: Thu, 27 May 2010 10:33:05 +0300 Subject: [PATCH] Added function to kill usersDialog when dialog is closed. --- Client/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Client/mainwindow.cpp b/Client/mainwindow.cpp index 27a1f4b..f86681c 100644 --- a/Client/mainwindow.cpp +++ b/Client/mainwindow.cpp @@ -168,6 +168,9 @@ MainWindow::~MainWindow() if(helpDialog) delete helpDialog; + if(usersDialog) + delete usersDialog; + if(customButtonAccelerate) delete customButtonAccelerate; if(customButtonRoute) @@ -343,6 +346,12 @@ void MainWindow::killDialog() delete helpDialog; helpDialog = NULL; } + if(usersDialog) + { + qDebug() << "__MW kill: usersDialog"; + delete usersDialog; + usersDialog = NULL; + } } /** @@ -464,5 +473,6 @@ void MainWindow::on_pushButtonUsers_clicked() connect(usersDialog, SIGNAL(getUserInfo(QString)), this, SLOT(requestGetUserInfo(QString))); //connect(usersDialog, SIGNAL(getUsers()), this, SLOT(requestGetUsers())); requestGetUsers(); + connect(usersDialog, SIGNAL(rejected()), this, SLOT(killDialog())); usersDialog->show(); } -- 1.7.9.5