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

Use int here

parent 5a553d87
......@@ -371,69 +371,69 @@ QString ContactGroup::id() const
return d->mIdentifier;
}
unsigned int ContactGroup::count() const
int ContactGroup::count() const
{
return d->mContactReferences.count() + d->mDataObjects.count();
}
unsigned int ContactGroup::contactReferenceCount() const
int ContactGroup::contactReferenceCount() const
{
return d->mContactReferences.count();
}
unsigned int ContactGroup::contactGroupReferenceCount() const
int ContactGroup::contactGroupReferenceCount() const
{
return d->mContactGroupReferences.count();
}
unsigned int ContactGroup::dataCount() const
int ContactGroup::dataCount() const
{
return d->mDataObjects.count();
}
ContactGroup::ContactReference &ContactGroup::contactReference(unsigned int index)
ContactGroup::ContactReference &ContactGroup::contactReference(int index)
{
Q_ASSERT_X(index < (unsigned int)d->mContactReferences.count(),
Q_ASSERT_X(index < d->mContactReferences.count(),
"contactReference()", "index out of range");
return d->mContactReferences[index];
}
const ContactGroup::ContactReference &ContactGroup::contactReference(unsigned int index) const
const ContactGroup::ContactReference &ContactGroup::contactReference(int index) const
{
Q_ASSERT_X(index < (unsigned int)d->mContactReferences.count(),
Q_ASSERT_X(index < d->mContactReferences.count(),
"contactReference()", "index out of range");
return d->mContactReferences[index];
}
ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(unsigned int index)
ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(int index)
{
Q_ASSERT_X(index < (unsigned int)d->mContactGroupReferences.count(),
Q_ASSERT_X(index < d->mContactGroupReferences.count(),
"contactGroupReference()", "index out of range");
return d->mContactGroupReferences[index];
}
const ContactGroup::ContactGroupReference &ContactGroup::contactGroupReference(
unsigned int index) const
int index) const
{
Q_ASSERT_X(index < (unsigned int)d->mContactGroupReferences.count(),
Q_ASSERT_X(index < d->mContactGroupReferences.count(),
"contactGroupReference()", "index out of range");
return d->mContactGroupReferences[index];
}
ContactGroup::Data &ContactGroup::data(unsigned int index)
ContactGroup::Data &ContactGroup::data(int index)
{
Q_ASSERT_X(index < (unsigned int)d->mDataObjects.count(), "data()", "index out of range");
Q_ASSERT_X(index < d->mDataObjects.count(), "data()", "index out of range");
return d->mDataObjects[index];
}
const ContactGroup::Data &ContactGroup::data(unsigned int index) const
const ContactGroup::Data &ContactGroup::data(int index) const
{
Q_ASSERT_X(index < (unsigned int)d->mDataObjects.count(), "data()", "index out of range");
Q_ASSERT_X(index < d->mDataObjects.count(), "data()", "index out of range");
return d->mDataObjects[index];
}
......
......@@ -366,52 +366,52 @@ public:
* Returns the number of contacts in this group.
* That includes the contact references and contact data.
*/
Q_REQUIRED_RESULT unsigned int count() const;
Q_REQUIRED_RESULT int count() const;
/**
* Returns the number of contact references in this group.
*/
Q_REQUIRED_RESULT unsigned int contactReferenceCount() const;
Q_REQUIRED_RESULT int contactReferenceCount() const;
/**
* Returns the number of group references in this group.
*/
Q_REQUIRED_RESULT unsigned int contactGroupReferenceCount() const;
Q_REQUIRED_RESULT int contactGroupReferenceCount() const;
/**
* Returns the number of contact data objects in this group.
*/
Q_REQUIRED_RESULT unsigned int dataCount() const;
Q_REQUIRED_RESULT int dataCount() const;
/**
* Returns the contact reference at the given @p index.
*/
Q_REQUIRED_RESULT ContactReference &contactReference(unsigned int index);
Q_REQUIRED_RESULT ContactReference &contactReference(int index);
/**
* Returns the contact reference at the given @p index.
*/
const ContactReference &contactReference(unsigned int index) const;
const ContactReference &contactReference(int index) const;
/**
* Returns the contact group reference at the given @p index.
*/
ContactGroupReference &contactGroupReference(unsigned int index);
ContactGroupReference &contactGroupReference(int index);
/**
* Returns the contact group reference at the given @p index.
*/
const ContactGroupReference &contactGroupReference(unsigned int index) const;
const ContactGroupReference &contactGroupReference(int index) const;
/**
* Returns the contact data object at the given @p index.
*/
Data &data(unsigned int index);
Data &data(int index);
/**
* Returns the contact data object at the given @p index.
*/
const Data &data(unsigned int index) const;
const Data &data(int index) const;
/**
* Appends a new contact @p reference to the contact group.
......
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