author | zautrix <zautrix> | 2004-10-05 08:07:41 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-05 08:07:41 (UTC) |
commit | ad859d26b813101adab963f50e694961702561d9 (patch) (side-by-side diff) | |
tree | 36eb7f12ee6ee80f50cdd13bbfaba74e9a1b37d1 /korganizer/calendarview.cpp | |
parent | fc2c103f45a6d4e4105259436266538c645f2c87 (diff) | |
download | kdepimpi-ad859d26b813101adab963f50e694961702561d9.zip kdepimpi-ad859d26b813101adab963f50e694961702561d9.tar.gz kdepimpi-ad859d26b813101adab963f50e694961702561d9.tar.bz2 |
cleanup
-rw-r--r-- | korganizer/calendarview.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index eaea040..fecc7e2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1221,14 +1221,14 @@ bool CalendarView::syncCalendar(QString filename, int mode) bool syncOK = false; storage->setFileName( filename ); // qDebug("loading ... "); - if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { + if ( storage->load() ) { getEventViewerDialog()->setSyncMode( true ); syncOK = synchronizeCalendar( mCalendar, calendar, mode ); getEventViewerDialog()->setSyncMode( false ); if ( syncOK ) { if ( KOPrefs::instance()->mWriteBackFile ) { - storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + storage->setSaveFormat( new ICalFormat() ); storage->save(); } } @@ -1499,7 +1499,7 @@ bool CalendarView::openCalendar(QString filename, bool merge) mStorage->setFileName( filename ); - if ( mStorage->load(KOPrefs::instance()->mUseQuicksave) ) { + if ( mStorage->load() ) { if ( merge ) ;//setModified( true ); else { //setModified( true ); @@ -1514,9 +1514,11 @@ bool CalendarView::openCalendar(QString filename, bool merge) setSyncEventsReadOnly(); updateUnmanagedViews(); updateView(); - if ( filename != MainWindow::defaultFileName() ) - saveCalendar( MainWindow::defaultFileName() ); loadedFileVersion = QDateTime::currentDateTime(); + if ( filename != MainWindow::defaultFileName() ) { + saveCalendar( MainWindow::defaultFileName() ); + watchSavedFile(); + } return true; } else { // while failing to load, the calendar object could @@ -1600,7 +1602,7 @@ bool CalendarView::saveCalendar( QString filename ) //mStorage->setFileName( filename ); - mStorage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + mStorage->setSaveFormat( new ICalFormat() ); mStorage->setFileName( filename ); bool success; success = mStorage->save(); @@ -2301,7 +2303,7 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) storage.save(); } else { fn += ".ics"; - FileStorage storage( cal, fn, new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + FileStorage storage( cal, fn, new ICalFormat( ) ); storage.save(); } delete cal; @@ -2856,7 +2858,7 @@ void CalendarView::action_mail() ev = new Event(*event); cal_tmp.addEvent(ev); } - ICalFormat mForm( KOPrefs::instance()->mUseQuicksave); + ICalFormat mForm(); QString attachment = mForm.toString( &cal_tmp ); if (ev) delete(ev); @@ -3141,7 +3143,7 @@ void CalendarView::exportICalendar() // Force correct extension if (filename.right(4) != ".ics") filename += ".ics"; - FileStorage storage( mCalendar, filename, new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + FileStorage storage( mCalendar, filename, new ICalFormat() ); storage.save(); } |