Details
- Reviewers
kde-frameworks-devel svuorela - Group Reviewers
Frameworks
Diff Detail
- Repository
- R244 KCoreAddons
- Branch
- usernameFromFullname
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10526 Build 10544: arc lint + arc unit
This helper function will be needed in places where we only have access to author/user's Full name. For Example, PDFs have Full Name in authors.
I think unit tests would be nice. Including unit tests documenting the behavior for multiple users with the same full name.
My systems have several users named "Sune Vuorela"
src/lib/util/kuser.h | ||
---|---|---|
412 | What happens if multiple users have the same full name? |
@aacid
I also want to add that code in Okular but doesn't it look strange to put User info functionality in Document Reader's code. My first priority is also to add this in Okular. If people here are OK with it then I will close this and add this along with the code that uses it in Okular.
@svuorela If system have user with same Real Name it would return the username of first user. I think, this function should be in Okular instead because there seems to be no use case where it would be used besides showing avatar for PDF's authors. Whats your comment on it.
@tsdgeos in Okular room suggest not to show any avatar in case if there are more than 1 users with exact same Real Name. But, I think we should skip it as there are many scenarios when the avatar being shown is not true to the reality.
@svuorela If system have user with same Real Name it would return the username of first user. I think, this function should be in Okular instead because there seems to be no use case where it would be used besides showing avatar for PDF's authors. Whats your comment on it.
I think it is less important to get it perfect if it just goes into okular as part of the application. There it can be adapted and evolved slowly. But we should have it perfect if it should land in one of the frameworks. The API defined here is kind of cast in stone.
/Sune