-rw-r--r-- | libopie2/opiepim/otodo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp index a29d88e..e087a00 100644 --- a/libopie2/opiepim/otodo.cpp +++ b/libopie2/opiepim/otodo.cpp | |||
@@ -96,30 +96,34 @@ OTodo::OTodo(bool completed, int priority, | |||
96 | 96 | ||
97 | data->date = date; | 97 | data->date = date; |
98 | data->isCompleted = completed; | 98 | data->isCompleted = completed; |
99 | data->hasDate = hasDate; | 99 | data->hasDate = hasDate; |
100 | data->priority = priority; | 100 | data->priority = priority; |
101 | data->sum = summary; | 101 | data->sum = summary; |
102 | data->prog = progress; | 102 | data->prog = progress; |
103 | data->desc = Qtopia::simplifyMultiLineSpace(description ); | 103 | data->desc = Qtopia::simplifyMultiLineSpace(description ); |
104 | } | 104 | } |
105 | bool OTodo::match( const QRegExp ®Exp )const | 105 | bool OTodo::match( const QRegExp ®Exp )const |
106 | { | 106 | { |
107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ | 107 | if( QString::number( data->priority ).find( regExp ) != -1 ){ |
108 | setLastHitField( Priority ); | ||
108 | return true; | 109 | return true; |
109 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ | 110 | }else if( data->hasDate && data->date.toString().find( regExp) != -1 ){ |
111 | setLastHitField( HasDate ); | ||
110 | return true; | 112 | return true; |
111 | }else if(data->desc.find( regExp ) != -1 ){ | 113 | }else if(data->desc.find( regExp ) != -1 ){ |
114 | setLastHitField( Description ); | ||
112 | return true; | 115 | return true; |
113 | }else if(data->sum.find( regExp ) != -1 ) { | 116 | }else if(data->sum.find( regExp ) != -1 ) { |
117 | setLastHitField( Summary ); | ||
114 | return true; | 118 | return true; |
115 | } | 119 | } |
116 | return false; | 120 | return false; |
117 | } | 121 | } |
118 | bool OTodo::isCompleted() const | 122 | bool OTodo::isCompleted() const |
119 | { | 123 | { |
120 | return data->isCompleted; | 124 | return data->isCompleted; |
121 | } | 125 | } |
122 | bool OTodo::hasDueDate() const | 126 | bool OTodo::hasDueDate() const |
123 | { | 127 | { |
124 | return data->hasDate; | 128 | return data->hasDate; |
125 | } | 129 | } |