messagingapp/msgutils/unidatautils/unidatamodelplugins/unismsdataplugin/tsrc/testunidatamodelsmsplugin/testunidatamodelsmsplugin.cpp
equal
deleted
inserted
replaced
15 */ |
15 */ |
16 #include <QtTest/QtTest> |
16 #include <QtTest/QtTest> |
17 #include <QtDebug> |
17 #include <QtDebug> |
18 #include <QTimer> |
18 #include <QTimer> |
19 #include <QSignalSpy> |
19 #include <QSignalSpy> |
20 #include "s60qconversions.h" |
20 #include <xqconversions.h> |
21 #include <csmsaccount.h> |
21 #include <csmsaccount.h> |
22 |
22 |
23 #include "convergedmessage.h" |
23 #include "convergedmessage.h" |
24 #include "unidatamodelplugininterface.h" |
24 #include "unidatamodelplugininterface.h" |
25 #include "unidatamodelloader.h" |
25 #include "unidatamodelloader.h" |
109 retTimeStamp.setTime_t(seconds.Int()); |
109 retTimeStamp.setTime_t(seconds.Int()); |
110 |
110 |
111 //AddBody |
111 //AddBody |
112 QString body(TEST_MSG_BODY); |
112 QString body(TEST_MSG_BODY); |
113 |
113 |
114 HBufC* bodyText = S60QConversions::qStringToS60Desc(body); |
114 HBufC* bodyText = XQConversions::qStringToS60Desc(body); |
115 if (bodyText) |
115 if (bodyText) |
116 { |
116 { |
117 CleanupStack::PushL(bodyText); |
117 CleanupStack::PushL(bodyText); |
118 // Set the Body of the message |
118 // Set the Body of the message |
119 CRichText & body = iSmsClientMtm->Body(); |
119 CRichText & body = iSmsClientMtm->Body(); |
129 |
129 |
130 QString recepient(TEST_MSG_FROM1); |
130 QString recepient(TEST_MSG_FROM1); |
131 QString recepient2(TEST_MSG_FROM2); |
131 QString recepient2(TEST_MSG_FROM2); |
132 QString alias(TEST_MSG_ALIAS1); |
132 QString alias(TEST_MSG_ALIAS1); |
133 |
133 |
134 HBufC* addr = S60QConversions::qStringToS60Desc(recepient); |
134 HBufC* addr = XQConversions::qStringToS60Desc(recepient); |
135 HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); |
135 HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); |
136 HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); |
136 HBufC* alias1 = XQConversions::qStringToS60Desc(alias); |
137 |
137 |
138 if (addr) |
138 if (addr) |
139 { |
139 { |
140 CleanupStack::PushL(addr); |
140 CleanupStack::PushL(addr); |
141 TBuf<32> name; |
141 TBuf<32> name; |
181 retTimeStamp.setTime_t(seconds.Int()); |
181 retTimeStamp.setTime_t(seconds.Int()); |
182 |
182 |
183 //AddBody |
183 //AddBody |
184 QString body(TEST_MSG_BODY); |
184 QString body(TEST_MSG_BODY); |
185 |
185 |
186 HBufC* bodyText = S60QConversions::qStringToS60Desc(body); |
186 HBufC* bodyText = XQConversions::qStringToS60Desc(body); |
187 if (bodyText) |
187 if (bodyText) |
188 { |
188 { |
189 CleanupStack::PushL(bodyText); |
189 CleanupStack::PushL(bodyText); |
190 // Set the Body of the message |
190 // Set the Body of the message |
191 CRichText & body = iSmsClientMtm->Body(); |
191 CRichText & body = iSmsClientMtm->Body(); |
201 |
201 |
202 QString recepient(TEST_MSG_FROM1); |
202 QString recepient(TEST_MSG_FROM1); |
203 QString recepient2(TEST_MSG_FROM2); |
203 QString recepient2(TEST_MSG_FROM2); |
204 QString alias(TEST_MSG_ALIAS1); |
204 QString alias(TEST_MSG_ALIAS1); |
205 |
205 |
206 HBufC* addr = S60QConversions::qStringToS60Desc(recepient); |
206 HBufC* addr = XQConversions::qStringToS60Desc(recepient); |
207 HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); |
207 HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); |
208 HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); |
208 HBufC* alias1 = XQConversions::qStringToS60Desc(alias); |
209 |
209 |
210 if (addr) |
210 if (addr) |
211 { |
211 { |
212 CleanupStack::PushL(addr); |
212 CleanupStack::PushL(addr); |
213 TBuf<32> name; |
213 TBuf<32> name; |
256 retTimeStamp.setTime_t(seconds.Int()); |
256 retTimeStamp.setTime_t(seconds.Int()); |
257 |
257 |
258 //AddBody |
258 //AddBody |
259 QString body(TEST_MSG_BODY); |
259 QString body(TEST_MSG_BODY); |
260 |
260 |
261 HBufC* bodyText = S60QConversions::qStringToS60Desc(body); |
261 HBufC* bodyText = XQConversions::qStringToS60Desc(body); |
262 if (bodyText) |
262 if (bodyText) |
263 { |
263 { |
264 CleanupStack::PushL(bodyText); |
264 CleanupStack::PushL(bodyText); |
265 // Set the Body of the message |
265 // Set the Body of the message |
266 CRichText & body = iSmsClientMtm->Body(); |
266 CRichText & body = iSmsClientMtm->Body(); |
276 |
276 |
277 QString recepient(TEST_MSG_FROM1); |
277 QString recepient(TEST_MSG_FROM1); |
278 QString recepient2(TEST_MSG_FROM2); |
278 QString recepient2(TEST_MSG_FROM2); |
279 QString alias(TEST_MSG_ALIAS1); |
279 QString alias(TEST_MSG_ALIAS1); |
280 |
280 |
281 HBufC* addr = S60QConversions::qStringToS60Desc(recepient); |
281 HBufC* addr = XQConversions::qStringToS60Desc(recepient); |
282 HBufC* addr2 = S60QConversions::qStringToS60Desc(recepient2); |
282 HBufC* addr2 = XQConversions::qStringToS60Desc(recepient2); |
283 HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); |
283 HBufC* alias1 = XQConversions::qStringToS60Desc(alias); |
284 |
284 |
285 if (addr) |
285 if (addr) |
286 { |
286 { |
287 CleanupStack::PushL(addr); |
287 CleanupStack::PushL(addr); |
288 TBuf<32> name; |
288 TBuf<32> name; |
329 retTimeStamp.setTime_t(seconds.Int()); |
329 retTimeStamp.setTime_t(seconds.Int()); |
330 |
330 |
331 //AddBody |
331 //AddBody |
332 QString body(TEST_MSG_BODY); |
332 QString body(TEST_MSG_BODY); |
333 |
333 |
334 HBufC* bodyText = S60QConversions::qStringToS60Desc(body); |
334 HBufC* bodyText = XQConversions::qStringToS60Desc(body); |
335 if (bodyText) |
335 if (bodyText) |
336 { |
336 { |
337 CleanupStack::PushL(bodyText); |
337 CleanupStack::PushL(bodyText); |
338 // Set the Body of the message |
338 // Set the Body of the message |
339 CRichText & body = iSmsClientMtm->Body(); |
339 CRichText & body = iSmsClientMtm->Body(); |
349 |
349 |
350 QString recipient(TEST_MSG_FROM1); |
350 QString recipient(TEST_MSG_FROM1); |
351 QString recipient2(TEST_MSG_FROM2); |
351 QString recipient2(TEST_MSG_FROM2); |
352 QString alias(TEST_MSG_ALIAS1); |
352 QString alias(TEST_MSG_ALIAS1); |
353 |
353 |
354 HBufC* addr = S60QConversions::qStringToS60Desc(recipient); |
354 HBufC* addr = XQConversions::qStringToS60Desc(recipient); |
355 HBufC* addr2 = S60QConversions::qStringToS60Desc(recipient2); |
355 HBufC* addr2 = XQConversions::qStringToS60Desc(recipient2); |
356 HBufC* alias1 = S60QConversions::qStringToS60Desc(alias); |
356 HBufC* alias1 = XQConversions::qStringToS60Desc(alias); |
357 |
357 |
358 if (addr) |
358 if (addr) |
359 { |
359 { |
360 CleanupStack::PushL(addr); |
360 CleanupStack::PushL(addr); |
361 TBuf<32> name; |
361 TBuf<32> name; |
394 indexEntry.iDate.HomeTime(); |
394 indexEntry.iDate.HomeTime(); |
395 |
395 |
396 //AddBody |
396 //AddBody |
397 QString body(TEST_MSG_BODY); |
397 QString body(TEST_MSG_BODY); |
398 |
398 |
399 HBufC* bodyText = S60QConversions::qStringToS60Desc(body); |
399 HBufC* bodyText = XQConversions::qStringToS60Desc(body); |
400 if (bodyText) |
400 if (bodyText) |
401 { |
401 { |
402 CleanupStack::PushL(bodyText); |
402 CleanupStack::PushL(bodyText); |
403 // Set the Body of the message |
403 // Set the Body of the message |
404 CRichText & body = iSmsClientMtm->Body(); |
404 CRichText & body = iSmsClientMtm->Body(); |