summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index fecc7e2..687943e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1520,21 +1520,34 @@ bool CalendarView::openCalendar(QString filename, bool merge)
1520 watchSavedFile(); 1520 watchSavedFile();
1521 } 1521 }
1522 return true; 1522 return true;
1523 } else { 1523 } else {
1524 // while failing to load, the calendar object could 1524 // while failing to load, the calendar object could
1525 // have become partially populated. Clear it out. 1525 // have become partially populated. Clear it out.
1526 if ( !merge ) mCalendar->close(); 1526 if ( !merge ) {
1527 mCalendar->close();
1528 mViewManager->setDocumentId( filename );
1529 mDialogManager->setDocumentId( filename );
1530 mTodoList->setDocumentId( filename );
1531 }
1527 1532
1528 KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename)); 1533 //KMessageBox::error(this,i18n("Couldn't load calendar\n '%1'.").arg(filename));
1529 1534
1535 QTimer::singleShot ( 1, this, SLOT ( showOpenError() ) );
1530 globalFlagBlockAgenda = 2; 1536 globalFlagBlockAgenda = 2;
1537 mCalendar->reInitAlarmSettings();
1538 setSyncEventsReadOnly();
1539 updateUnmanagedViews();
1531 updateView(); 1540 updateView();
1532 } 1541 }
1533 return false; 1542 return false;
1534} 1543}
1544void CalendarView::showOpenError()
1545{
1546 KMessageBox::error(this,i18n("Couldn't load calendar\n."));
1547}
1535void CalendarView::setLoadedFileVersion(QDateTime dt) 1548void CalendarView::setLoadedFileVersion(QDateTime dt)
1536{ 1549{
1537 loadedFileVersion = dt; 1550 loadedFileVersion = dt;
1538} 1551}
1539bool CalendarView::checkFileChanged(QString fn) 1552bool CalendarView::checkFileChanged(QString fn)
1540{ 1553{