author | zautrix <zautrix> | 2005-04-23 20:32:56 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-23 20:32:56 (UTC) |
commit | 119181e56ffd7987ae57749bde85935e29482955 (patch) (unidiff) | |
tree | 194551ded27d91ad912d0cbc7dac29bbd502fc0e /korganizer | |
parent | d5787e249e4c60fb8de5141b07f9bb4b94c65868 (diff) | |
download | kdepimpi-119181e56ffd7987ae57749bde85935e29482955.zip kdepimpi-119181e56ffd7987ae57749bde85935e29482955.tar.gz kdepimpi-119181e56ffd7987ae57749bde85935e29482955.tar.bz2 |
fixii
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 3c0259f..94d7293 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1794,33 +1794,33 @@ void MainWindow::saveStopTimer() | |||
1794 | mSaveTimer.stop(); | 1794 | mSaveTimer.stop(); |
1795 | } | 1795 | } |
1796 | void MainWindow::save() | 1796 | void MainWindow::save() |
1797 | { | 1797 | { |
1798 | if ( !mCalendarModifiedFlag ) { | 1798 | if ( !mCalendarModifiedFlag ) { |
1799 | qDebug("KO: Calendar not modified. Nothing saved."); | 1799 | qDebug("KO: Calendar not modified. Nothing saved."); |
1800 | return; | 1800 | return; |
1801 | } | 1801 | } |
1802 | if ( mSyncManager->blockSave() ) | 1802 | if ( mSyncManager->blockSave() ) |
1803 | return; | 1803 | return; |
1804 | mSyncManager->setBlockSave(true); | 1804 | mSyncManager->setBlockSave(true); |
1805 | if ( mView->checkFileVersion( defaultFileName()) ) { | 1805 | if ( mView->checkFileVersion( defaultFileName()) ) { |
1806 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ | 1806 | if ( KPimGlobalPrefs::instance()->mBackupEnabled ){ |
1807 | QDate reference ( 2000,1,1); | 1807 | QDate reference ( 2000,1,1); |
1808 | int daysTo = reference.daysTo ( QDate::currentDate() ); | 1808 | int daysTo = reference.daysTo ( QDate::currentDate() ); |
1809 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { | 1809 | if ( daysTo - KPimGlobalPrefs::instance()->mBackupDayCount >= KOPrefs::instance()->mLastBackupDate ) { |
1810 | setCaption(i18n("KO/Pi:Creating backup ... please wait ..." )); | 1810 | setCaption(i18n("Creating backup ... please wait ..." )); |
1811 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); | 1811 | qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); |
1812 | // we need the file path, the backup dir and the number of bups as param | 1812 | // we need the file path, the backup dir and the number of bups as param |
1813 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; | 1813 | QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; |
1814 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) | 1814 | if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) |
1815 | bupDir = KGlobalSettings::backupDataDir(); | 1815 | bupDir = KGlobalSettings::backupDataDir(); |
1816 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); | 1816 | int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); |
1817 | if ( retval == 0 ) { | 1817 | if ( retval == 0 ) { |
1818 | qDebug("KO: Backup cancelled. Will try again tomorrow "); | 1818 | qDebug("KO: Backup cancelled. Will try again tomorrow "); |
1819 | // retval == 0 : backup skipped for today, try again tomorrow | 1819 | // retval == 0 : backup skipped for today, try again tomorrow |
1820 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; | 1820 | KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; |
1821 | } else if ( retval == 1 ){ | 1821 | } else if ( retval == 1 ){ |
1822 | qDebug("KO: Backup created."); | 1822 | qDebug("KO: Backup created."); |
1823 | // backup ok | 1823 | // backup ok |
1824 | KOPrefs::instance()->mLastBackupDate = daysTo; | 1824 | KOPrefs::instance()->mLastBackupDate = daysTo; |
1825 | 1825 | ||
1826 | } else if ( retval == 2 ){ | 1826 | } else if ( retval == 2 ){ |