Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generateDisplayLabel doesnt follow SeasideCache::displayLabelOrder() #103

Closed
CODeRUS opened this issue May 5, 2014 · 8 comments
Closed

Comments

@CODeRUS
Copy link

CODeRUS commented May 5, 2014

Check
https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.h#L345
Why hardcoded order and not using SeasideCache::displayLabelOrder() here?

@matthewvogt
Copy link
Contributor

No good reason - it should use the configured default.

@CODeRUS
Copy link
Author

CODeRUS commented May 5, 2014

It shouldnt have this property at all since displayLabelOrder is readonly and follow system settings.

@matthewvogt
Copy link
Contributor

I don't see any reason to restrict the use of this static utility function, simply because the behavior of the instances is constrained to follow the default.

@CODeRUS
Copy link
Author

CODeRUS commented May 6, 2014

Problem is not generateDisplayLabel function itself.
Problems are:
https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.cpp#L118
https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.cpp#L128
even https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.cpp#L268
because of recalculateDisplayLabel(). It's never called with right order (https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.cpp#L2214 is never called)
And because of that displayLabel property (https://github.com/nemomobile/nemo-qml-plugin-contacts/blob/master/src/seasideperson.h#L210) doesnt follow system First/LastNameFirst order and always generated with FirstNameFirst order.

@matthewvogt
Copy link
Contributor

Agreed. So, the fix should be to change the default argument to be the result of invoking SeasideCache::displayLabelOrder(), right?

@CODeRUS
Copy link
Author

CODeRUS commented May 6, 2014

exactly. displayLabel property should be generated with SeasideCache::displayLabelOrder()

@matthewvogt
Copy link
Contributor

#104

Thanks for the report.

@CODeRUS
Copy link
Author

CODeRUS commented May 6, 2014

Thank you! Waiting for upstream release :)

@CODeRUS CODeRUS closed this as completed Jun 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants