summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
authorzautrix <zautrix>2005-06-13 20:42:10 (UTC)
committer zautrix <zautrix>2005-06-13 20:42:10 (UTC)
commitfe1114cea0321405b362d642912f1f72257c7cbd (patch) (unidiff)
tree89f5cc1050a86c497fc406ebbea88669b6bea1a6 /korganizer/mainwindow.cpp
parent0000f74badd326f62620d818a5e5d9944e55bda0 (diff)
downloadkdepimpi-fe1114cea0321405b362d642912f1f72257c7cbd.zip
kdepimpi-fe1114cea0321405b362d642912f1f72257c7cbd.tar.gz
kdepimpi-fe1114cea0321405b362d642912f1f72257c7cbd.tar.bz2
fixxxx
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()
1824 if ( mSyncManager->blockSave() ) 1824 if ( mSyncManager->blockSave() )
1825 return; 1825 return;
1826 mSyncManager->setBlockSave(true); 1826 mSyncManager->setBlockSave(true);
1827 if ( mView->checkFileVersion( defaultFileName()) ) { 1827 if ( mView->checkAllFileVersions() ) {
1828 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ 1828 if ( KPimGlobalPrefs::instance()->mBackupEnabled ){
1829 QDate reference ( 2000,1,1); 1829 QDate reference ( 2000,1,1);
1830 int daysTo = reference.daysTo ( QDate::currentDate() ); 1830 int daysTo = reference.daysTo ( QDate::currentDate() );
@@ -1843,8 +1843,16 @@ void MainWindow::save()
1843 } else if ( retval == 1 ){ 1843 } else if ( retval == 1 ){
1844 qDebug("KO: Backup created."); 1844 qDebug("KO: Backup created.");
1845 // backup ok 1845 // backup ok
1846 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
1847 KopiCalendarFile * cal = calendars.first();
1848 cal = calendars.next();
1849 while ( cal ) {
1850 if ( !cal->mErrorOnLoad ) {
1851 int retval = KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
1852 }
1853 cal = calendars.next();
1854 }
1846 KOPrefs::instance()->mLastBackupDate = daysTo; 1855 KOPrefs::instance()->mLastBackupDate = daysTo;
1847
1848 } else if ( retval == 2 ){ 1856 } else if ( retval == 2 ){
1849 qDebug("KO: Backup globally cancelled."); 1857 qDebug("KO: Backup globally cancelled.");
1850 // backup globally cancelled 1858 // backup globally cancelled