get username from full name usernameFromFullname(QString fullname) -> QString
AbandonedPublic

Authored by ahmedbilal on Apr 6 2019, 5:33 PM.

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
ahmedbilal created this revision.Apr 6 2019, 5:33 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 6 2019, 5:33 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ahmedbilal requested review of this revision.Apr 6 2019, 5:33 PM

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.

aacid added a subscriber: aacid.Apr 6 2019, 6:34 PM

This code seems like it could live in Okular instead of kcoreaddons?

svuorela requested changes to this revision.Apr 6 2019, 7:56 PM
svuorela added a subscriber: svuorela.

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?

This revision now requires changes to proceed.Apr 6 2019, 7:56 PM
ahmedbilal added a comment.EditedApr 7 2019, 7:46 AM

This code seems like it could live in Okular instead of kcoreaddons?

@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.

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"

@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

@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

Got it. How can I remove this diff from here?

aacid added a comment.Apr 9 2019, 9:38 PM

In the "Add Action..." combo you should have an "Abandon" option

ahmedbilal abandoned this revision.Apr 10 2019, 6:02 PM