Diffstat (limited to 'core/pim/todo/taskeditorstatus.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/todo/taskeditorstatus.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp index b11fdab..4331877 100644 --- a/core/pim/todo/taskeditorstatus.cpp +++ b/core/pim/todo/taskeditorstatus.cpp @@ -170,25 +170,25 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f } TaskEditorStatus::~TaskEditorStatus() { } void TaskEditorStatus::load( const OTodo &todo ) { QDate date = QDate::currentDate(); QString str = TimeString::longDateString( date ); // Status - int state = todo.state().state(); + int state = todo.hasState()? todo.state().state() : OPimState::NotStarted; if ( state == OPimState::Undefined ) state = OPimState::NotStarted; cmbStatus->setCurrentItem( state ); // Progress cmbProgress->setCurrentItem( todo.progress() / 20 ); // Start date ckbStart->setChecked( todo.hasStartDate() ); btnStart->setEnabled( todo.hasStartDate() ); if ( todo.hasStartDate() ) { @@ -207,25 +207,25 @@ void TaskEditorStatus::load( const OTodo &todo ) // Completed ckbComp->setChecked( todo.isCompleted() ); btnComp->setEnabled( todo.hasCompletedDate() ); if ( todo.hasCompletedDate() ) { m_comp = todo.completedDate(); btnComp->setText( TimeString::longDateString( m_comp ) ); } else btnComp->setText( str ); // Maintainer Mode - state = todo.maintainer().mode(); + state = todo.hasMaintainer() ? todo.maintainer().mode() : OPimMaintainer::Nothing; if ( state == OPimMaintainer::Undefined ) state = OPimMaintainer::Nothing; cmbMaintMode->setCurrentItem( state ); // Maintainer - not implemented yet } void TaskEditorStatus::save( OTodo &todo ) { QDate inval; // Status |