summaryrefslogtreecommitdiff
Side-by-side diff
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()
{
//qDebug("Task::Task fromMap");
//dump( m );
for ( QMap<int,QString>::ConstIterator it = m.begin(); it != m.end();++it )
switch ( (TaskFields) it.key() ) {
case HasDate: if ( *it == "1" ) mDue = TRUE; break;
case Completed: setCompleted( *it == "1" ); break;
case TaskCategory: setCategories( idsFromString( *it ) ); break;
case TaskDescription: setDescription( *it ); break;
case Priority: setPriority( (*it).toInt() ); break;
case Date: mDueDate = TimeConversion::fromString( (*it) ); break;
case TaskUid: setUid( (*it).toInt() ); break;
+ default: break;
}
}
Task::~Task()
{
}
QMap<int, QString> Task::toMap() const
{
QMap<int, QString> m;
m.insert( HasDate, hasDueDate() ? "1" : "0" );
m.insert( Completed, isCompleted() ? "1" : "0" );