summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-09-07 15:02:14 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-09-07 15:02:14 +0200
commit01ea1cb9ca4547c406ce0ed72b3f5f6ce18d91d9 (patch)
treef7407f5cb05d41a3e08439688097239d6bc63761 /client
parenta105650f7520d4762c83ff6af52e80581fd1ab3d (diff)
Make simple-quit if no sessionid has been assigned.
Diffstat (limited to 'client')
-rw-r--r--client/mainwindow.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc
index 7bf4116..9436f41 100644
--- a/client/mainwindow.cc
+++ b/client/mainwindow.cc
@@ -239,15 +239,17 @@ void MainWindow::closeEvent(QCloseEvent *event)
return;
}
- if(isStored || MessageBox::critical(this,
- tr("Discard"),
- tr("This session will "
- "<strong>NOT</strong> be stored in "
- "the journal.<br/>"
- "Are you sure you want to continue?"),
- MessageBox::Yes | MessageBox::No)
- == MessageBox::Yes) {
- if(!isStored) {
+ if(netcom.sessionid == "" ||
+ isStored ||
+ MessageBox::critical(this,
+ tr("Discard"),
+ tr("This session will "
+ "<strong>NOT</strong> be stored in "
+ "the journal.<br/>"
+ "Are you sure you want to continue?"),
+ MessageBox::Yes | MessageBox::No) == MessageBox::Yes)
+ {
+ if(netcom.sessionid != "" && !isStored) {
netcom.discard();
// isStored = true;
closing = true;