summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2016-01-29 17:29:07 +0100
committerJonathan Bauer2016-01-29 17:29:07 +0100
commit272aaf3d4f32d866c0f50ec5f31ae60cddb8c0fa (patch)
treee9cf6d033a92ce3e300541f1f83d8187f2147f25
parentfix missing german translation for "What's this?" (diff)
downloadpvs2-272aaf3d4f32d866c0f50ec5f31ae60cddb8c0fa.tar.gz
pvs2-272aaf3d4f32d866c0f50ec5f31ae60cddb8c0fa.tar.xz
pvs2-272aaf3d4f32d866c0f50ec5f31ae60cddb8c0fa.zip
properly close the toolbar (?)
-rw-r--r--src/client/toolbar/toolbar.cpp8
-rw-r--r--src/client/toolbar/toolbar.h2
-rw-r--r--src/client/vnc/vncserver.cpp4
-rw-r--r--src/server/mainwindow/mainwindow.cpp2
4 files changed, 10 insertions, 6 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 00360fd..f8da738 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -75,7 +75,11 @@ Toolbar::Toolbar(QWidget *parent)
{
init();
}
-
+void Toolbar::exit() {
+ this->close();
+ this->deleteLater();
+ qApp->quit();
+}
void Toolbar::init()
{
_ui = new Ui::Toolbar;
@@ -114,7 +118,7 @@ void Toolbar::init()
connect(_menu, SIGNAL(aboutToHide()), this, SLOT(hideBar()));
connect(_acnDisconnect, SIGNAL(triggered()), _connectWindow, SLOT(doShow()));
connect(_acnAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
- connect(_acnQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
+ connect(_acnQuit, SIGNAL(triggered()), this, SLOT(exit()));
/* Connect the signals from vnc server */
connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerIsRunning(int)));
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h
index 25964c6..27849cf 100644
--- a/src/client/toolbar/toolbar.h
+++ b/src/client/toolbar/toolbar.h
@@ -58,7 +58,7 @@ private slots:
void onDisconnected();
void onConnected(ServerConnection* connection);
void onDoDisconnect();
-
+ void exit();
void cameraBlink();
void showBar();
void hideBar();
diff --git a/src/client/vnc/vncserver.cpp b/src/client/vnc/vncserver.cpp
index 77beda2..aa7a89e 100644
--- a/src/client/vnc/vncserver.cpp
+++ b/src/client/vnc/vncserver.cpp
@@ -100,8 +100,8 @@ void VncServer::start()
args << "-forever";
args << "-display" << ":0";
args << "-passwdfile" << (QString("rm:" + pwfile));
- args << "-shared";
- args << "-repeat";
+ args << "-shared";
+ args << "-repeat";
args << "-autoport" << QString::number(54112);
// Get rect of primary screen
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 854d921..400f40a 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -438,7 +438,7 @@ ConnectionFrame* MainWindow::getSelectedFrame()
*/
void MainWindow::closeEvent(QCloseEvent* e)
{
- int ret = QMessageBox::question(this, "Test", "Exit?", 0, 1, 2);
+ int ret = QMessageBox::question(this, "Question", "Are you sure you want to exit?", 0, 1, 2);
if (ret == 1)
QApplication::exit(0);
else