Add the qmlcontacts test back to the set of auto tests

The qmlcontacts test was previously removed from the set of executed
auto tests. This change adds it back to the executed list.

Skip jsondb-dependent tests if the jsondb components cannot be loaded,
and update some of the tests to do something sane.  Some particularly
odd cases are now marked with expectFail, as I have no idea why they
might have ever been expected to pass.

Change-Id: I391edcecb93e0ad50122e9adbf6a6af6da8c0ec7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Remove jsondb backends

The jsondb contact and organizer backends are unsupported.

Change-Id: I6aa76c94b97edad20d43d777f75ec66f0400b65e
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Fix organizer tests in outlying timezones

Fix test failures resulting from incorrect handling of local and
UTC time, which fail only in timezones some distance from UTC.

Change-Id: I8ddecf501a4db46aca07a1e5d5db7dc5eb804b78
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Add QContactType::TypeFacet value

Allow a contacts backend to provide explicit support for composition
of contact representations into a single composite contact.

A single logical contact can be represented in a QtContacts system
as multiple separate elements, each created and maintained by separate
software systems. To support this use-case, provide the 'Facet'
contact type, which has the same structure as a TypeContact contact,
but different semantics.  A facet is defined as the portion of an
individual contact known by any one system, which is probably incomplete.
For example, an email service will be able to know the name and email
address of a contact from message metadata, but has no access to phone
numbers or mailing addresses. By storing contact details as facets, it
explicitly allows them to be aggregated into more comprehensive contact
representations.

Facet contacts are made available to clients as regular contacts by
producing contacts of type TypeContact, which aggregate the details of
the facets together into a composite whole. The correspondence between
facets and their composing contacts is defined by QContactRelationship
records with type 'Aggregates'.

The semantics governing the behavior of facets and composite contacts
when modified or deleted are left to be defined by each backend
that implements the Facet type.

Change-Id: I486e2d9140fca5d306dc56fb5de9bb6ca2327686
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Fixed DisplayName conversion to vcard.

Based on VCARD spec "FN" field is only one string, the old implementation store a string list
and does not change the property type, that causes the following error:

Variant value is a QStringList but the property's value type is neither CompoundType or ListType

Changing the property to store a single string fixes the problem.

Change-Id: I7a7857fb2c498518d7940410d0bb65558e230fec
Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Revert change to QContactRelationship participant types

A earlier change converted QContactRelationship first and second
properties to use QContact rather than QContactId representations.
The motivation for this change is unclear, but it resulted in
undesirable complication to the interface without obvious benefits.

This change restores the original ID-based representation for
relationships.

Change-Id: Iaeff907d11efcda0ef3ba3161ee0c3e760b0dd1a
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Get rid of StorageLocations concept

The StorageLocations concept was introduced to support a feature
of the qtjsondb backends, which were never released and have now
been removed. The concept is no longer desired, as the semantics
are unclear and no existing backend provides the feature.

Change-Id: I4b1826c8e9562bc4e6c8d93935909b8b8089f29f
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
[versit] Ensure VCARD output is deterministic

Sort the parameters emitted by the VCARD writers so ensure that the
results are deterministic for testing purposes. The specification
does not constrain ordering, so this change is required only to
make the test code simple and robust.

Also sort some QDebug output values for the same reason.

Task-number: QTBUG-25382

Change-Id: Ifcebc4c13fc1c3b6cb963235c55b83cee1a65571
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Extend changed signals to optionally report changed types

Add a parameter to the contactsChanged and itemsChanged signals, which
allow a manager to optionally report the extent of changes involved in
a contact or organizer item modification. If no changes are explicitly
reported by the manager, the receiver must assume that any or all
details of the contacts or organizer items may have been modified.

Change-Id: Ie8a0d051c3f82a5911dea68213d78c2b173e762e
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>