summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 1338224..377a66f 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1857,6 +1857,2 @@ bool CalendarView::loadCalendars()
restoreCalendarSettings();
- mCalendar->reInitAlarmSettings();
- setSyncEventsReadOnly();
- updateUnmanagedViews();
- updateView();
return true;
@@ -1875,2 +1871,6 @@ bool CalendarView::restoreCalendarSettings()
}
+ setSyncEventsReadOnly();
+ mCalendar->reInitAlarmSettings();
+ updateUnmanagedViews();
+ updateView();
return true;
@@ -1997,4 +1997,8 @@ bool CalendarView::checkAllFileVersions()
mCalendar->setDefaultCalendarEnabledOnly();
- if ( !checkFileVersion(MainWindow::defaultFileName()))
- return false;
+ if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
+ if ( !checkFileVersion(MainWindow::defaultFileName())) {
+ restoreCalendarSettings();
+ return false;
+ }
+ }
cal = calendars.next();
@@ -2002,3 +2006,3 @@ bool CalendarView::checkAllFileVersions()
while ( cal ) {
- if ( !cal->mErrorOnLoad ) {
+ if ( !cal->isReadOnly && !cal->mErrorOnLoad ) {
mCalendar->setDefaultCalendar( cal->mCalNumber );
@@ -2008,3 +2012,3 @@ bool CalendarView::checkAllFileVersions()
loadedFileVersion = storeTemp;
- updateView();
+ restoreCalendarSettings();
return false;
@@ -2015,3 +2019,2 @@ bool CalendarView::checkAllFileVersions()
loadedFileVersion = storeTemp;
- updateView();
return true;
@@ -2024,4 +2027,4 @@ bool CalendarView::checkFileVersion(QString fn)
QDateTime dt = finf.lastModified ();
- //qDebug("loaded file version %s",loadedFileVersion.toString().latin1());
- //qDebug("file on disk version %s",dt.toString().latin1());
+ qDebug("loaded file version %s %s", fn.latin1(), loadedFileVersion.toString().latin1());
+ qDebug("file on disk version %s %s", fn.latin1(),dt.toString().latin1());
if ( dt <= loadedFileVersion )