Skip to content

Commit

Permalink
[contacts] Fix default sort order. Fixes JB#45731
Browse files Browse the repository at this point in the history
Configuration default should be First Name, not Last Name.
  • Loading branch information
Bea Lam committed May 8, 2019
1 parent 1099536 commit 388a5a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/contactsdatabase.cpp
Expand Up @@ -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");
}
Expand Down

0 comments on commit 388a5a1

Please sign in to comment.