/*!
 * Removes the specified contact object from the Etel store.
 *
 * \param contactId Id of the contact to be removed.
 * \param qtError Qt error code.
 * \return Error status.
 */
bool CntSymbianSimEngine::removeContacts(const QList<QContactLocalId>& contactIds, QMap<int, QContactManager::Error>* errorMap, QContactManager::Error* error)
{
    QContactRemoveRequest req;
    req.setContactIds(contactIds);
    executeRequest(&req, error);
    if (errorMap)
        *errorMap = req.errorMap();    
    return (*error == QContactManager::NoError);
}
Пример #2
0
void tst_StoragesLocationsMissing::init()
{
    // Make sure all tests in this test case start with an empty system storage.
    QContactIdFetchRequest idFetchRequest;
    idFetchRequest.setManager(m_contactManager);
    idFetchRequest.setStorageLocations(QContactAbstractRequest::SystemStorage);
    idFetchRequest.start();
    idFetchRequest.waitForFinished();
    if (!idFetchRequest.ids().isEmpty()) {
        QContactRemoveRequest removeRequest;
        removeRequest.setManager(m_contactManager);
        removeRequest.setContactIds(idFetchRequest.ids());
        removeRequest.start();
        removeRequest.waitForFinished();
    }
}