summaryrefslogtreecommitdiff
path: root/core/pim/todo/taskeditorstatus.cpp
authorzecke <zecke>2003-05-07 16:16:44 (UTC)
committer zecke <zecke>2003-05-07 16:16:44 (UTC)
commit1cee00987d34729393fb9383d90babd39517cc68 (patch) (unidiff)
tree03a51eaf8bfcfd242b4bb98d29e941b0b9dcb38a /core/pim/todo/taskeditorstatus.cpp
parent1e9e3371d61cfc404329a8bad51f8b061c1ad73d (diff)
downloadopie-1cee00987d34729393fb9383d90babd39517cc68.zip
opie-1cee00987d34729393fb9383d90babd39517cc68.tar.gz
opie-1cee00987d34729393fb9383d90babd39517cc68.tar.bz2
try to use the has* functions
Diffstat (limited to 'core/pim/todo/taskeditorstatus.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/taskeditorstatus.cpp4
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
@@ -176,13 +176,13 @@ TaskEditorStatus::~TaskEditorStatus()
176void TaskEditorStatus::load( const OTodo &todo ) 176void TaskEditorStatus::load( const OTodo &todo )
177{ 177{
178 QDate date = QDate::currentDate(); 178 QDate date = QDate::currentDate();
179 QString str = TimeString::longDateString( date ); 179 QString str = TimeString::longDateString( date );
180 180
181 // Status 181 // Status
182 int state = todo.state().state(); 182 int state = todo.hasState()? todo.state().state() : OPimState::NotStarted;
183 if ( state == OPimState::Undefined ) 183 if ( state == OPimState::Undefined )
184 state = OPimState::NotStarted; 184 state = OPimState::NotStarted;
185 cmbStatus->setCurrentItem( state ); 185 cmbStatus->setCurrentItem( state );
186 186
187 // Progress 187 // Progress
188 cmbProgress->setCurrentItem( todo.progress() / 20 ); 188 cmbProgress->setCurrentItem( todo.progress() / 20 );
@@ -213,13 +213,13 @@ void TaskEditorStatus::load( const OTodo &todo )
213 btnComp->setText( TimeString::longDateString( m_comp ) ); 213 btnComp->setText( TimeString::longDateString( m_comp ) );
214 } 214 }
215 else 215 else
216 btnComp->setText( str ); 216 btnComp->setText( str );
217 217
218 // Maintainer Mode 218 // Maintainer Mode
219 state = todo.maintainer().mode(); 219 state = todo.hasMaintainer() ? todo.maintainer().mode() : OPimMaintainer::Nothing;
220 if ( state == OPimMaintainer::Undefined ) 220 if ( state == OPimMaintainer::Undefined )
221 state = OPimMaintainer::Nothing; 221 state = OPimMaintainer::Nothing;
222 cmbMaintMode->setCurrentItem( state ); 222 cmbMaintMode->setCurrentItem( state );
223 223
224 // Maintainer - not implemented yet 224 // Maintainer - not implemented yet
225} 225}