Commit a8dc81ba authored by Laurent Montel's avatar Laurent Montel 😁

Use QVector

parent 7512101f
......@@ -31,7 +31,7 @@ class AbstractContactFormatter::Private
public:
KContacts::Addressee mContact;
Akonadi::Item mItem;
QList<QVariantMap> mCustomFieldDescriptions;
QVector<QVariantMap> mCustomFieldDescriptions;
};
AbstractContactFormatter::AbstractContactFormatter()
......@@ -64,12 +64,12 @@ Akonadi::Item AbstractContactFormatter::item() const
return d->mItem;
}
void AbstractContactFormatter::setCustomFieldDescriptions(const QList<QVariantMap> &descriptions)
void AbstractContactFormatter::setCustomFieldDescriptions(const QVector<QVariantMap> &descriptions)
{
d->mCustomFieldDescriptions = descriptions;
}
QList<QVariantMap> AbstractContactFormatter::customFieldDescriptions() const
QVector<QVariantMap> AbstractContactFormatter::customFieldDescriptions() const
{
return d->mCustomFieldDescriptions;
}
......@@ -107,12 +107,12 @@ public:
*
* @param descriptions list with field descriptions
*/
void setCustomFieldDescriptions(const QList<QVariantMap> &descriptions);
void setCustomFieldDescriptions(const QVector<QVariantMap> &descriptions);
/**
* Returns the custom field descriptions that will be used.
*/
QList<QVariantMap> customFieldDescriptions() const;
QVector<QVariantMap> customFieldDescriptions() const;
/**
* This method must be reimplemented to return the contact formatted as HTML
......
......@@ -31,7 +31,7 @@ class AbstractContactGroupFormatter::Private
public:
KContacts::ContactGroup mContactGroup;
Akonadi::Item mItem;
QList<QVariantMap> mAdditionalFields;
QVector<QVariantMap> mAdditionalFields;
};
AbstractContactGroupFormatter::AbstractContactGroupFormatter()
......@@ -64,12 +64,12 @@ Akonadi::Item AbstractContactGroupFormatter::item() const
return d->mItem;
}
void AbstractContactGroupFormatter::setAdditionalFields(const QList<QVariantMap> &fields)
void AbstractContactGroupFormatter::setAdditionalFields(const QVector<QVariantMap> &fields)
{
d->mAdditionalFields = fields;
}
QList<QVariantMap> AbstractContactGroupFormatter::additionalFields() const
QVector<QVariantMap> AbstractContactGroupFormatter::additionalFields() const
{
return d->mAdditionalFields;
}
......@@ -100,12 +100,12 @@ public:
*
* @param fields additional fields that will be shown
*/
void setAdditionalFields(const QList<QVariantMap> &fields);
void setAdditionalFields(const QVector<QVariantMap> &fields);
/**
* Returns the additional fields that will be shown.
*/
QList<QVariantMap> additionalFields() const;
QVector<QVariantMap> additionalFields() const;
/**
* This method must be reimplemented to return the contact group formatted as HTML
......
......@@ -78,7 +78,7 @@ public:
mContactGroupFormatter->setContactGroup(group);
QList<QVariantMap> additionalFields;
QVector<QVariantMap> additionalFields;
if (!mCurrentAddressBookName.isEmpty()) {
QVariantMap addressBookName;
......
......@@ -135,7 +135,7 @@ public:
#endif // HAVE_PRISON
// merge local and global custom field descriptions
QList<QVariantMap> customFieldDescriptions;
QVector<QVariantMap> customFieldDescriptions;
const CustomField::List globalCustomFields = CustomFieldManager::globalCustomFieldDescriptions();
customFieldDescriptions.reserve(localCustomFieldDescriptions.count() + globalCustomFields.count());
foreach (const QVariant &entry, localCustomFieldDescriptions) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment