summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-20 13:55:25 (UTC)
committer zautrix <zautrix>2004-09-20 13:55:25 (UTC)
commitf222bd1339ac8323e3c99af84a6f83c21cacb8f8 (patch) (side-by-side diff)
treebb56c3ff65506007eb48cea896d5893f70893261
parentb01b669d88fa195261d29ecf73b1c69e608a5ebc (diff)
downloadkdepimpi-f222bd1339ac8323e3c99af84a6f83c21cacb8f8.zip
kdepimpi-f222bd1339ac8323e3c99af84a6f83c21cacb8f8.tar.gz
kdepimpi-f222bd1339ac8323e3c99af84a6f83c21cacb8f8.tar.bz2
Fix todo crash
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/kotodoview.cpp6
2 files changed, 8 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 8e83723..ba0e6c6 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1903,69 +1903,69 @@ void CalendarView::updateConfig()
emit configChanged();
mTodoList->updateConfig();
// mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont);
mCalendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
// To make the "fill window" configurations work
//mViewManager->raiseCurrentView();
}
void CalendarView::eventChanged(Event *event)
{
changeEventDisplay(event,KOGlobals::EVENTEDITED);
//updateUnmanagedViews();
}
void CalendarView::eventAdded(Event *event)
{
changeEventDisplay(event,KOGlobals::EVENTADDED);
}
void CalendarView::eventToBeDeleted(Event *)
{
kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
}
void CalendarView::eventDeleted()
{
changeEventDisplay(0,KOGlobals::EVENTDELETED);
}
void CalendarView::changeTodoDisplay(Todo *which, int action)
{
changeIncidenceDisplay((Incidence *)which, action);
- mDateNavigator->updateView();
+ mDateNavigator->updateView(); //LR
//mDialogManager->updateSearchDialog();
if (which) {
- mViewManager->currentView()->updateView();
+ //mViewManager->currentView()->updateView();//LR
//mTodoList->updateView();
}
}
void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
{
updateUnmanagedViews();
//qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
if ( action == KOGlobals::EVENTDELETED ) { //delete
mCalendar->checkAlarmForIncidence( 0, true );
if ( mEventViewerDialog )
mEventViewerDialog->hide();
}
else
mCalendar->checkAlarmForIncidence( which , false );
}
// most of the changeEventDisplays() right now just call the view's
// total update mode, but they SHOULD be recoded to be more refresh-efficient.
void CalendarView::changeEventDisplay(Event *which, int action)
{
// kdDebug() << "CalendarView::changeEventDisplay" << endl;
changeIncidenceDisplay((Incidence *)which, action);
mDateNavigator->updateView();
//mDialogManager->updateSearchDialog();
if (which) {
// If there is an event view visible update the display
mViewManager->currentView()->changeEventDisplay(which,action);
// TODO: check, if update needed
// if (which->getTodoStatus()) {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index d9e0a03..da46eca 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -464,64 +464,70 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
// setNarrow();
// mTodoListView->setColumnWidth( 0, 100 );
// }
}
KOTodoView::~KOTodoView()
{
delete mDocPrefs;
}
void KOTodoView::jumpToDate ()
{
// if (mActiveItem) {
// mActiveItem->todo());
// if ( mActiveItem->todo()->hasDueDate() )
// emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() );
}
void KOTodoView::setNarrow()
{
//mTodoListView->setColumnWidth( 0, 120 );
mTodoListView->setColumnWidth( 1, 35 );
mTodoListView->setColumnWidth( 2, 40 );
mTodoListView->setColumnWidth( 3, 80 );
mTodoListView->setColumnWidth( 4, 40 );
mTodoListView->setColumnWidth( 5, 90 );
}
void KOTodoView::updateView()
{
+
+ if ( mBlockUpdate ) {
+ //qDebug("blocked ");
+ return;
+ }
+ //qDebug("update ");
// kdDebug() << "KOTodoView::updateView()" << endl;
QFont fo = KOPrefs::instance()->mTodoViewFont;
mTodoListView->clear();
if ( mName == "todolistsmall" ) {
if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) {
int ps = fo.pointSize() -2;
if ( ps > 12 )
ps -= 2;
fo.setPointSize( ps );
}
}
mTodoListView->setFont( fo );
// QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont );
//mTodoListView->header()->setMaximumHeight(fm.height());
QPtrList<Todo> todoList = calendar()->todos();
/*
kdDebug() << "KOTodoView::updateView(): Todo List:" << endl;
Event *t;
for(t = todoList.first(); t; t = todoList.next()) {
kdDebug() << " " << t->getSummary() << endl;
if (t->getRelatedTo()) {
kdDebug() << " (related to " << t->getRelatedTo()->getSummary() << ")" << endl;
}
QPtrList<Event> l = t->getRelations();
Event *c;
for(c=l.first();c;c=l.next()) {
kdDebug() << " - relation: " << c->getSummary() << endl;
}