summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 94bc4c1..9c55e9f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -508,2 +508,6 @@ void MainWindow::closeEvent( QCloseEvent* ce )
saveOnClose();
+ if ( mCalendarModifiedFlag ) {
+ ce->ignore();
+ return;
+ }
mClosed = true;
@@ -520,2 +524,6 @@ void MainWindow::closeEvent( QCloseEvent* ce )
saveOnClose();
+ if ( mCalendarModifiedFlag ) {
+ ce->ignore();
+ return;
+ }
mClosed = true;
@@ -2004,4 +2012,4 @@ void MainWindow::save()
qDebug("KO: Start saving data to file!");
- mView->saveCalendars();
- mCalendarModifiedFlag = false;
+ if ( mView->saveCalendars() )
+ mCalendarModifiedFlag = false;
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );