mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
kdepasswm kcm: Fall back to the system full name when necessary.
When loading the KCM data and KEmailSettings::RealName is empty, fall back to using the user's real name from /etc/passwd or equivalent via KUser. To quote the original review request: "Besides, such method seems natural, considering that change of real username in kcm module calls chfn to change real name in finger db, which will be reflected back in KUser::FullName." REVIEW: 104965 Submitted by: Aleksey Yermakov <alexey.yermakov@rosalab.ru>
This commit is contained in:
parent
f4fbf758ce
commit
a277b80df8
1 changed files with 7 additions and 1 deletions
|
@ -144,7 +144,13 @@ void KCMUserAccount::load()
|
|||
|
||||
_kes->setProfile(_kes->defaultProfileName());
|
||||
|
||||
_mw->leRealname->setText( _kes->getSetting( KEMailSettings::RealName ));
|
||||
QString realName = _kes->getSetting( KEMailSettings::RealName );
|
||||
|
||||
if (realName.isEmpty()) {
|
||||
realName = _ku->property(KUser::FullName).toString();
|
||||
}
|
||||
|
||||
_mw->leRealname->setText( realName );
|
||||
_mw->leEmail->setText( _kes->getSetting( KEMailSettings::EmailAddress ));
|
||||
_mw->leOrganization->setText( _kes->getSetting( KEMailSettings::Organization ));
|
||||
_mw->leSMTP->setText( _kes->getSetting( KEMailSettings::OutServer ));
|
||||
|
|
Loading…
Reference in a new issue