equal
deleted
inserted
replaced
460 QContactDetailFilter invalidFilter; |
460 QContactDetailFilter invalidFilter; |
461 mobileFilter.setDetailDefinitionName("asfdasdf", "asdfasdf"); |
461 mobileFilter.setDetailDefinitionName("asfdasdf", "asdfasdf"); |
462 |
462 |
463 // Retrieve contacts with invalid filter |
463 // Retrieve contacts with invalid filter |
464 cnt_ids = m_engine->contactIds(invalidFilter, s, &err); |
464 cnt_ids = m_engine->contactIds(invalidFilter, s, &err); |
465 QVERIFY(err == QContactManager::NotSupportedError); |
465 QVERIFY(cnt_ids.count() == 0); |
466 |
466 |
467 // Retrieve sorted contacts |
467 // Retrieve sorted contacts |
468 QContactSortOrder sortOrder; |
468 QContactSortOrder sortOrder; |
469 QList<QContactSortOrder> s1; |
469 QList<QContactSortOrder> s1; |
470 sortOrder.setDetailDefinitionName(QContactName::DefinitionName, QContactName::FieldFirstName); |
470 sortOrder.setDetailDefinitionName(QContactName::DefinitionName, QContactName::FieldFirstName); |
722 contacts.append(c.localId()); |
722 contacts.append(c.localId()); |
723 } |
723 } |
724 contacts.insert(3, 0); |
724 contacts.insert(3, 0); |
725 |
725 |
726 QVERIFY(!m_engine->removeContacts(contacts, &errorMap, &err)); |
726 QVERIFY(!m_engine->removeContacts(contacts, &errorMap, &err)); |
727 QVERIFY(err == QContactManager::DoesNotExistError); |
727 QVERIFY(err == QContactManager::BadArgumentError); //not allowed to delete |
728 foreach(QContactManager::Error e, errorMap) { |
728 //a contact with id = 0 |
729 QVERIFY(e == QContactManager::DoesNotExistError); |
|
730 } |
|
731 |
|
732 for(int i=0; i<contacts.count(); i++) { |
|
733 QContact f = m_engine->contact(contacts[i], hint, &err); |
|
734 QVERIFY(f.localId() == 0); |
|
735 QVERIFY(err == QContactManager::DoesNotExistError); |
|
736 } |
|
737 } |
729 } |
738 |
730 |
739 void TestSymbianEngine::addOwnCard() |
731 void TestSymbianEngine::addOwnCard() |
740 { |
732 { |
741 QContactManager::Error err; |
733 QContactManager::Error err; |
1038 org.setTitle("Assistant Manager"); |
1030 org.setTitle("Assistant Manager"); |
1039 org.setLocation("Nokia Cyber Park"); |
1031 org.setLocation("Nokia Cyber Park"); |
1040 orgContact.saveDetail(&org); |
1032 orgContact.saveDetail(&org); |
1041 label = m_engine->synthesizedDisplayLabel(orgContact, &err); |
1033 label = m_engine->synthesizedDisplayLabel(orgContact, &err); |
1042 QVERIFY(err == QContactManager::NoError); |
1034 QVERIFY(err == QContactManager::NoError); |
1043 QVERIFY(label == QString("Nokia")); |
1035 QVERIFY(label.isEmpty()); |
1044 |
1036 |
1045 QContact jargon; |
1037 QContact jargon; |
1046 jargon.setType("jargon"); |
1038 jargon.setType("jargon"); |
1047 label = m_engine->synthesizedDisplayLabel(jargon, &err); |
1039 label = m_engine->synthesizedDisplayLabel(jargon, &err); |
1048 QVERIFY(err == QContactManager::InvalidContactTypeError); |
1040 QVERIFY(err == QContactManager::InvalidContactTypeError); |