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 f05ada5..472a978 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1824,7 +1824,7 @@ void MainWindow::save()
if ( mSyncManager->blockSave() )
return;
mSyncManager->setBlockSave(true);
- if ( mView->checkFileVersion( defaultFileName()) ) {
+ if ( mView->checkAllFileVersions() ) {
if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
QDate reference ( 2000,1,1);
int daysTo = reference.daysTo ( QDate::currentDate() );
@@ -1843,8 +1843,16 @@ void MainWindow::save()
} else if ( retval == 1 ){
qDebug("KO: Backup created.");
// backup ok
+ QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ KopiCalendarFile * cal = calendars.first();
+ cal = calendars.next();
+ while ( cal ) {
+ if ( !cal->mErrorOnLoad ) {
+ int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
+ }
+ cal = calendars.next();
+ }
KOPrefs::instance()->mLastBackupDate = daysTo;
-
} else if ( retval == 2 ){
qDebug("KO: Backup globally cancelled.");
// backup globally cancelled