equal
deleted
inserted
replaced
75 //open symbian database |
75 //open symbian database |
76 m_manager = new QContactManager("symbian"); |
76 m_manager = new QContactManager("symbian"); |
77 |
77 |
78 // Remove all contacts from the database |
78 // Remove all contacts from the database |
79 QList<QContactLocalId> cnt_ids = m_manager->contactIds(); |
79 QList<QContactLocalId> cnt_ids = m_manager->contactIds(); |
80 QVERIFY( m_manager->removeContacts(cnt_ids, 0 ) ); |
80 m_manager->removeContacts(cnt_ids, 0 ); |
81 cnt_ids = m_manager->contactIds(); |
81 cnt_ids = m_manager->contactIds(); |
82 QCOMPARE(cnt_ids.count(), 0); |
82 QCOMPARE(cnt_ids.count(), 0); |
83 |
83 |
84 } |
84 } |
85 |
85 |
95 void ST_LogsCntFinderQwerty::createContacts() |
95 void ST_LogsCntFinderQwerty::createContacts() |
96 { |
96 { |
97 |
97 |
98 // Remove all contacts from the database |
98 // Remove all contacts from the database |
99 QList<QContactLocalId> cnt_ids = m_manager->contactIds(); |
99 QList<QContactLocalId> cnt_ids = m_manager->contactIds(); |
100 QVERIFY( m_manager->removeContacts(cnt_ids, 0 ) ); |
100 m_manager->removeContacts(cnt_ids, 0 ); |
101 cnt_ids = m_manager->contactIds(); |
101 cnt_ids = m_manager->contactIds(); |
102 QVERIFY(0 == cnt_ids.count()); |
102 QVERIFY(0 == cnt_ids.count()); |
103 |
103 |
104 // 'id' first last phonenumber email1 email2 email3 |
104 // 'id' first last phonenumber email1 email2 email3 |
105 ADD_CONTACT( 1, "Stefann", "Yadira", "0035893424558", "syadira@gmail.com", "stefann.yadira@nokia.com", "" ); |
105 ADD_CONTACT( 1, "Stefann", "Yadira", "0035893424558", "syadira@gmail.com", "stefann.yadira@nokia.com", "" ); |
126 //search "s", contact (1 & 7) match |
126 //search "s", contact (1 & 7) match |
127 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchNameAndEmailMatch() |
127 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchNameAndEmailMatch() |
128 { |
128 { |
129 |
129 |
130 createContacts(); |
130 createContacts(); |
131 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
132 |
131 |
133 QContactDetailFilter df; |
132 QContactDetailFilter df; |
134 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
133 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
135 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
134 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
136 QContactLocalId cid; |
135 QContactLocalId cid; |
159 //search "s ya", contact (1) match |
158 //search "s ya", contact (1) match |
160 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchWithSpace() |
159 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchWithSpace() |
161 { |
160 { |
162 |
161 |
163 createContacts(); |
162 createContacts(); |
164 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
165 |
163 |
166 QContactDetailFilter df; |
164 QContactDetailFilter df; |
167 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
165 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
168 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
166 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
169 QContactLocalId cid; |
167 QContactLocalId cid; |
184 //search "syadira", contact (1) match |
182 //search "syadira", contact (1) match |
185 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchEmailMatch() |
183 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchEmailMatch() |
186 { |
184 { |
187 |
185 |
188 createContacts(); |
186 createContacts(); |
189 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
190 |
187 |
191 QContactDetailFilter df; |
188 QContactDetailFilter df; |
192 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
189 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
193 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
190 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
194 QContactLocalId cid; |
191 QContactLocalId cid; |
208 //search "pett", no match |
205 //search "pett", no match |
209 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchNoEmails() |
206 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchNoEmails() |
210 { |
207 { |
211 |
208 |
212 createContacts(); |
209 createContacts(); |
213 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
214 |
210 |
215 QContactDetailFilter df; |
211 QContactDetailFilter df; |
216 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
212 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
217 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
213 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
218 QContact contact; |
214 QContact contact; |
228 //search "levis.augu_whatever", contact (6) match |
224 //search "levis.augu_whatever", contact (6) match |
229 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchOverLongPattern() |
225 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchOverLongPattern() |
230 { |
226 { |
231 |
227 |
232 createContacts(); |
228 createContacts(); |
233 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
234 |
229 |
235 QContactDetailFilter df; |
230 QContactDetailFilter df; |
236 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
231 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
237 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
232 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
238 QContactLocalId cid; |
233 QContactLocalId cid; |
252 //search "olga.b", contact (3) match |
247 //search "olga.b", contact (3) match |
253 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchSpecialCharsInPattern() |
248 void ST_LogsCntFinderQwerty::testPredictiveEmailSearchSpecialCharsInPattern() |
254 { |
249 { |
255 |
250 |
256 createContacts(); |
251 createContacts(); |
257 QEXPECT_FAIL("", "Not implemented", Abort ); |
|
258 |
252 |
259 QContactDetailFilter df; |
253 QContactDetailFilter df; |
260 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
254 df.setDetailDefinitionName(QContactName::DefinitionName, QContactEmailAddress::FieldEmailAddress ); |
261 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
255 df.setMatchFlags( QContactFilter::MatchKeypadCollation ); |
262 QContactLocalId cid; |
256 QContactLocalId cid; |