summaryrefslogtreecommitdiff
authorsimon <simon>2002-03-25 19:20:12 (UTC)
committer simon <simon>2002-03-25 19:20:12 (UTC)
commit843b7b0841976f8d6ea0ff0306dc0f59ebdeece0 (patch) (side-by-side diff)
treeebe9b0d81db9a22d083438200c1efb201a1834e8
parent956522a9355051294e12e85e564d8ae1f0b928a3 (diff)
downloadopie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.zip
opie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.tar.gz
opie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.tar.bz2
- added missing default: break; in switch
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
@@ -30,48 +30,49 @@
using namespace Qtopia;
UidGen Task::sUidGen( UidGen::Qtopia );
Task::Task() : Record(), mDue( FALSE ),
mDueDate( QDate::currentDate() ),
mCompleted( FALSE ), mPriority( 3 ), mDesc()
{
}
Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ),
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" );
m.insert( TaskCategory, idsToString( categories() ) );
m.insert( TaskDescription, description() );
m.insert( Priority, QString::number( priority() ) );
m.insert( Date, TimeConversion::toString( dueDate() ) );
m.insert( TaskUid, QString::number(uid()) );
//qDebug("Task::toMap");
//dump( m );
return m;
}
void Task::save( QString& buf ) const