summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 687943e..b1da144 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1509,17 +1509,17 @@ bool CalendarView::openCalendar(QString filename, bool merge)
}
globalFlagBlockAgenda = 2;
// if ( getLastSyncEvent() )
// getLastSyncEvent()->setReadOnly( true );
mCalendar->reInitAlarmSettings();
setSyncEventsReadOnly();
updateUnmanagedViews();
updateView();
- loadedFileVersion = QDateTime::currentDateTime();
+ setLoadedFileVersion( QDateTime::currentDateTime().addSecs( -1 ));
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.
@@ -1562,16 +1562,17 @@ bool CalendarView::checkFileChanged(QString fn)
}
void CalendarView::watchSavedFile()
{
QFileInfo finf ( MainWindow::defaultFileName());
if ( !finf.exists() )
return;
QDateTime dt = finf.lastModified ();
if ( dt < loadedFileVersion ) {
+ //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1());
QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) );
return;
}
loadedFileVersion = dt;
}
bool CalendarView::checkFileVersion(QString fn)
{