aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-09-21 13:14:37 -0400
committerKen Moore <ken@ixsystems.com>2017-09-21 13:14:37 -0400
commite16c24c26e8d3c07139250dee5c9b9562cec187c (patch)
tree1a2a1776d97071c8dca14e70daa900e3fcdd1858 /src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
parentAdd a few quick safety checks to ensure that lumina-xconfig never disables th... (diff)
parentMerge remote-tracking branch 'origin/master' (diff)
downloadlumina-e16c24c26e8d3c07139250dee5c9b9562cec187c.tar.gz
lumina-e16c24c26e8d3c07139250dee5c9b9562cec187c.tar.bz2
lumina-e16c24c26e8d3c07139250dee5c9b9562cec187c.zip
Merge branch 'master' of github.com:trueos/lumina
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/MainUI.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/MainUI.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
index 52a29c01..4c2ce0bd 100644
--- a/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
+++ b/src-qt5/desktop-utils/lumina-textedit/MainUI.cpp
@@ -496,11 +496,11 @@ void MainUI::closeEvent(QCloseEvent *ev){
unsaved << tmp->currentFile();
}
}
- bool quitnow = unsaved.isEmpty();
- if(!quitnow && !ui->actionShow_Popups->isChecked()){ quitnow = true; }
- if(!quitnow){
- quitnow = (QMessageBox::Yes == QMessageBox::question(this, tr("Lose Unsaved Changes?"), QString(tr("There are unsaved changes.\nDo you want to close the editor anyway?\n\n%1")).arg(unsaved.join("\n")), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) );
- }
- if(quitnow){ QMainWindow::closeEvent(ev); }
- else{ ev->ignore(); }
+ bool savenow = unsaved.isEmpty();
+ if(!savenow && !ui->actionShow_Popups->isChecked()){ savenow = true; }
+ if(!savenow){
+ savenow = (QMessageBox::Yes == QMessageBox::question(this, tr("Save Changes before closing?"), QString(tr("There are unsaved changes.\nDo you want save them before you close the editor?\n\n%1")).arg(unsaved.join("\n")), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) );
+ }
+ if(!savenow){ QMainWindow::closeEvent(ev); }
+ else{ ev->ignore(); SaveFile(); }
}
bgstack15