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
@@ -507,4 +507,8 @@ void MainWindow::closeEvent( QCloseEvent* ce )
if ( ! KOPrefs::instance()->mAskForQuit ) {
saveOnClose();
+ if ( mCalendarModifiedFlag ) {
+ ce->ignore();
+ return;
+ }
mClosed = true;
ce->accept();
@@ -519,4 +523,8 @@ void MainWindow::closeEvent( QCloseEvent* ce )
case 0:
saveOnClose();
+ if ( mCalendarModifiedFlag ) {
+ ce->ignore();
+ return;
+ }
mClosed = true;
ce->accept();
@@ -2003,6 +2011,6 @@ void MainWindow::save()
setCaption(i18n("KO/Pi:Saving Data to File ..." ));
qDebug("KO: Start saving data to file!");
- mView->saveCalendars();
- mCalendarModifiedFlag = false;
+ if ( mView->saveCalendars() )
+ mCalendarModifiedFlag = false;
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
qDebug("KO: Needed %d ms for saving.",msNeeded );