-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 @@ -1220,16 +1220,16 @@ bool CalendarView::syncCalendar(QString filename, int mode) FileStorage* storage = new FileStorage( calendar ); 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(); } } setModified( true ); @@ -1498,9 +1498,9 @@ bool CalendarView::openCalendar(QString filename, bool merge) if (!merge) mCalendar->close(); mStorage->setFileName( filename ); - if ( mStorage->load(KOPrefs::instance()->mUseQuicksave) ) { + if ( mStorage->load() ) { if ( merge ) ;//setModified( true ); else { //setModified( true ); mViewManager->setDocumentId( filename ); @@ -1513,11 +1513,13 @@ bool CalendarView::openCalendar(QString filename, bool merge) mCalendar->reInitAlarmSettings(); 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 // have become partially populated. Clear it out. @@ -1599,9 +1601,9 @@ bool CalendarView::saveCalendar( QString filename ) mViewManager->currentView()->flushView(); //mStorage->setFileName( filename ); - mStorage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + mStorage->setSaveFormat( new ICalFormat() ); mStorage->setFileName( filename ); bool success; success = mStorage->save(); if ( !success ) { @@ -2300,9 +2302,9 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) FileStorage storage( cal, fn, new VCalFormat ); storage.save(); } else { fn += ".ics"; - FileStorage storage( cal, fn, new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); + FileStorage storage( cal, fn, new ICalFormat( ) ); storage.save(); } delete cal; mes = i18n("KO/Pi: Ready for beaming"); @@ -2855,9 +2857,9 @@ void CalendarView::action_mail() event = static_cast<Event *>(incidence); 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); mailClient.mailAttendees(currentSelection(), attachment); @@ -3140,9 +3142,9 @@ 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(); } bool CalendarView::exportVCalendar( QString filename ) |