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