summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/backend/task.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/library/backend/task.cpp b/library/backend/task.cpp
index e7d697d..f0a38f1 100644
--- a/library/backend/task.cpp
+++ b/library/backend/task.cpp
@@ -42,24 +42,25 @@ mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc()
42{ 42{
43 //qDebug("Task::Task fromMap"); 43 //qDebug("Task::Task fromMap");
44 //dump( m ); 44 //dump( m );
45 for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it ) 45 for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it )
46 switch ( (TaskFields) it.key() ) { 46 switch ( (TaskFields) it.key() ) {
47 case HasDate: if ( *it == "1" ) mDue = TRUE; break; 47 case HasDate: if ( *it == "1" ) mDue = TRUE; break;
48 case Completed: setCompleted( *it == "1" ); break; 48 case Completed: setCompleted( *it == "1" ); break;
49 case TaskCategory: setCategories( idsFromString( *it ) ); break; 49 case TaskCategory: setCategories( idsFromString( *it ) ); break;
50 case TaskDescription: setDescription( *it ); break; 50 case TaskDescription: setDescription( *it ); break;
51 case Priority: setPriority( (*it).toInt() ); break; 51 case Priority: setPriority( (*it).toInt() ); break;
52 case Date: mDueDate = TimeConversion::fromString( (*it) ); break; 52 case Date: mDueDate = TimeConversion::fromString( (*it) ); break;
53 case TaskUid: setUid( (*it).toInt() ); break; 53 case TaskUid: setUid( (*it).toInt() ); break;
54 default: break;
54 } 55 }
55} 56}
56 57
57Task::~Task() 58Task::~Task()
58{ 59{
59} 60}
60 61
61QMap<int, QString> Task::toMap() const 62QMap<int, QString> Task::toMap() const
62{ 63{
63 QMap<int, QString> m; 64 QMap<int, QString> m;
64 m.insert( HasDate, hasDueDate() ? "1" : "0" ); 65 m.insert( HasDate, hasDueDate() ? "1" : "0" );
65 m.insert( Completed, isCompleted() ? "1" : "0" ); 66 m.insert( Completed, isCompleted() ? "1" : "0" );