author | simon <simon> | 2002-03-25 19:20:12 (UTC) |
---|---|---|
committer | simon <simon> | 2002-03-25 19:20:12 (UTC) |
commit | 843b7b0841976f8d6ea0ff0306dc0f59ebdeece0 (patch) (unidiff) | |
tree | ebe9b0d81db9a22d083438200c1efb201a1834e8 | |
parent | 956522a9355051294e12e85e564d8ae1f0b928a3 (diff) | |
download | opie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.zip opie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.tar.gz opie-843b7b0841976f8d6ea0ff0306dc0f59ebdeece0.tar.bz2 |
- added missing default: break; in switch
-rw-r--r-- | library/backend/task.cpp | 1 |
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 @@ | |||
30 | 30 | ||
31 | using namespace Qtopia; | 31 | using namespace Qtopia; |
32 | UidGen Task::sUidGen( UidGen::Qtopia ); | 32 | UidGen Task::sUidGen( UidGen::Qtopia ); |
33 | 33 | ||
34 | Task::Task() : Record(), mDue( FALSE ), | 34 | Task::Task() : Record(), mDue( FALSE ), |
35 | mDueDate( QDate::currentDate() ), | 35 | mDueDate( QDate::currentDate() ), |
36 | mCompleted( FALSE ), mPriority( 3 ), mDesc() | 36 | mCompleted( FALSE ), mPriority( 3 ), mDesc() |
37 | { | 37 | { |
38 | } | 38 | } |
39 | 39 | ||
40 | Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ), | 40 | Task::Task( const QMap<int, QString> &m ) : Record(), mDue( FALSE ), |
41 | mDueDate( QDate::currentDate() ), mCompleted( FALSE ), mPriority( 3 ), mDesc() | 41 | 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 | ||
57 | Task::~Task() | 58 | Task::~Task() |
58 | { | 59 | { |
59 | } | 60 | } |
60 | 61 | ||
61 | QMap<int, QString> Task::toMap() const | 62 | QMap<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" ); |
66 | m.insert( TaskCategory, idsToString( categories() ) ); | 67 | m.insert( TaskCategory, idsToString( categories() ) ); |
67 | m.insert( TaskDescription, description() ); | 68 | m.insert( TaskDescription, description() ); |
68 | m.insert( Priority, QString::number( priority() ) ); | 69 | m.insert( Priority, QString::number( priority() ) ); |
69 | m.insert( Date, TimeConversion::toString( dueDate() ) ); | 70 | m.insert( Date, TimeConversion::toString( dueDate() ) ); |
70 | m.insert( TaskUid, QString::number(uid()) ); | 71 | m.insert( TaskUid, QString::number(uid()) ); |
71 | 72 | ||
72 | //qDebug("Task::toMap"); | 73 | //qDebug("Task::toMap"); |
73 | //dump( m ); | 74 | //dump( m ); |
74 | return m; | 75 | return m; |
75 | } | 76 | } |
76 | 77 | ||
77 | void Task::save( QString& buf ) const | 78 | void Task::save( QString& buf ) const |