Commit b742eb0f authored by blam's avatar blam

Merge branch 'jb45731-sort-order' into 'master'

[contacts] Fix default sort order. Fixes JB#45731

See merge request mer-core/qtcontacts-sqlite!22
parents 1099536c 388a5a13
......@@ -3456,13 +3456,15 @@ void ContactsDatabase::regenerateDisplayLabelGroups()
QString ContactsDatabase::displayLabelGroupPreferredProperty() const
{
QString retn(QStringLiteral("QContactName::FieldLastName"));
QString retn(QStringLiteral("QContactName::FieldFirstName"));
#ifdef HAS_MLITE
const QVariant groupPropertyConf = m_groupPropertyConf.value();
if (groupPropertyConf.isValid()) {
const QString gpcString = groupPropertyConf.toString();
if (gpcString.compare(QStringLiteral("FirstName"), Qt::CaseInsensitive) == 0) {
retn = QStringLiteral("QContactName::FieldFirstName");
} else if (gpcString.compare(QStringLiteral("LastName"), Qt::CaseInsensitive) == 0) {
retn = QStringLiteral("QContactName::FieldLastName");
} else if (gpcString.compare(QStringLiteral("DisplayLabel"), Qt::CaseInsensitive) == 0) {
retn = QStringLiteral("QContactDisplayLabel::FieldLabel");
}
......
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