[ActiveQt] qutlook sample crashes with distribution lists
The qutlook sample may crash if the contact list contains items that
are not regular contacts, for example distribution lists. The crash
occur because items such as distribution lists do not have the requested
properties (FirstName, LastName etc).
This patch works around this issue by checking if the contact list item
is a contact before attempting to access the requested properties.
A side effect is that non-contact entries show up as blank lines in the
address list.
In addition, the patch fixes an issue where the qutlook app crashes if
creating the Outlook COM server fails. This was related to an
uninitialized variable (AddressBookModel::folderItems)
Task-number: QTBUG-111191
Pick-to: 6.5 6.6
Change-Id: I6abfdaba4a49ef85bc245b26779b8bfdc409887b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>