author | zautrix <zautrix> | 2004-10-08 13:31:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-08 13:31:08 (UTC) |
commit | ec5bc1b8c708b55884f1e03861204123de097129 (patch) (side-by-side diff) | |
tree | 0c5c8a341fd69ed9b45a22a42b9445da8b56a5e8 | |
parent | 38e390e51967b34d53e19bd275efd1760572cdfb (diff) | |
download | kdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.zip kdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.tar.gz kdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.tar.bz2 |
cleanup
-rw-r--r-- | korganizer/calendarview.cpp | 38 | ||||
-rw-r--r-- | korganizer/calendarview.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
3 files changed, 13 insertions, 33 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 04051a2..0c35bb3 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -700,7 +700,2 @@ void CalendarView::createPrinter() -void CalendarView::confSync() -{ - //DELETE -} - @@ -1203,2 +1198,3 @@ bool CalendarView::syncCalendar(QString filename, int mode) { + //qDebug("syncCalendar %s ", filename.latin1()); mGlobalSyncMode = SYNC_MODE_NORMAL; @@ -1229,6 +1225,3 @@ bool CalendarView::syncCalendar(QString filename, int mode) } -void CalendarView::syncPhone() -{ - //DELETE -} + void CalendarView::syncExternal( int mode ) @@ -1315,8 +1308,2 @@ void CalendarView::syncExternal( int mode ) } -void CalendarView::syncSharp() -{ - //DELETE - -} - @@ -1591,6 +1578,9 @@ bool CalendarView::openCalendar(QString filename, bool merge) updateView(); - setLoadedFileVersion( QDateTime::currentDateTime().addSecs( -1 )); if ( filename != MainWindow::defaultFileName() ) { saveCalendar( MainWindow::defaultFileName() ); - watchSavedFile(); + } else { + QFileInfo finf ( MainWindow::defaultFileName()); + if ( finf.exists() ) { + setLoadedFileVersion( finf.lastModified () ); + } } @@ -1691,4 +1681,4 @@ bool CalendarView::saveCalendar( QString filename ) - //mStorage->setFileName( filename ); - + + QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); mStorage->setSaveFormat( new ICalFormat() ); @@ -1700,3 +1690,6 @@ bool CalendarView::saveCalendar( QString filename ) } - + if ( filename == MainWindow::defaultFileName() ) { + setLoadedFileVersion( lfv ); + watchSavedFile(); + } return true; @@ -2184,7 +2177,2 @@ void CalendarView::edit_options() } -void CalendarView::edit_sync_options() -{ - // DELETE - -} diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 751b8d9..660cce7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -322,3 +322,2 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void edit_options(); - void edit_sync_options(); /** @@ -438,4 +437,2 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser const QString &tasklistFile ); - void syncSharp( ); - void syncPhone( ); void syncExternal( int mode ); @@ -468,3 +465,2 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser virtual bool syncExternal(KSyncManager* manager, QString resource); - void confSync(); void setSyncManager(KSyncManager* manager); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index c7ce8cb..2d17986 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1386,3 +1386,2 @@ void MainWindow::save() qDebug("KO: Start saving data to file!"); - mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1)); mView->saveCalendar( defaultFileName() ); @@ -1390,3 +1389,2 @@ void MainWindow::save() int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); - mView->watchSavedFile(); qDebug("KO: Needed %d ms for saving.",msNeeded ); @@ -1823,6 +1821,4 @@ void MainWindow::getFile( bool success ) } - mView->watchSavedFile(); mView->openCalendar( defaultFileName() ); setCaption( i18n("Pi-Sync successful!") ); - } |