From ec5bc1b8c708b55884f1e03861204123de097129 Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 08 Oct 2004 13:31:08 +0000 Subject: cleanup --- (limited to 'korganizer/calendarview.cpp') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 04051a2..0c35bb3 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -698,11 +698,6 @@ void CalendarView::createPrinter() #endif } -void CalendarView::confSync() -{ - //DELETE -} - //KOPrefs::instance()->mWriteBackFile //KOPrefs::instance()->mWriteBackExistingOnly @@ -1201,6 +1196,7 @@ void CalendarView::setSyncName( QString s ) } bool CalendarView::syncCalendar(QString filename, int mode) { + //qDebug("syncCalendar %s ", filename.latin1()); mGlobalSyncMode = SYNC_MODE_NORMAL; CalendarLocal* calendar = new CalendarLocal(); calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); @@ -1227,10 +1223,7 @@ bool CalendarView::syncCalendar(QString filename, int mode) updateView(); return syncOK; } -void CalendarView::syncPhone() -{ - //DELETE -} + void CalendarView::syncExternal( int mode ) { mGlobalSyncMode = SYNC_MODE_EXTERNAL; @@ -1313,12 +1306,6 @@ void CalendarView::syncExternal( int mode ) return ;//syncOK; } -void CalendarView::syncSharp() -{ - //DELETE - -} - bool CalendarView::importBday() { @@ -1589,10 +1576,13 @@ bool CalendarView::openCalendar(QString filename, bool merge) setSyncEventsReadOnly(); updateUnmanagedViews(); 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 () ); + } } return true; } else { @@ -1689,8 +1679,8 @@ bool CalendarView::saveCalendar( QString filename ) if ( mViewManager->currentView() ) mViewManager->currentView()->flushView(); - //mStorage->setFileName( filename ); - + + QDateTime lfv = QDateTime::currentDateTime().addSecs( -2); mStorage->setSaveFormat( new ICalFormat() ); mStorage->setFileName( filename ); bool success; @@ -1698,7 +1688,10 @@ bool CalendarView::saveCalendar( QString filename ) if ( !success ) { return false; } - + if ( filename == MainWindow::defaultFileName() ) { + setLoadedFileVersion( lfv ); + watchSavedFile(); + } return true; } @@ -2182,11 +2175,6 @@ void CalendarView::edit_options() mDialogManager->showOptionsDialog(); //writeSettings(); } -void CalendarView::edit_sync_options() -{ - // DELETE - -} void CalendarView::slotSelectPickerDate( QDate d) { -- cgit v0.9.0.2