diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index 4e02cdcdf..71bd48725 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #ifdef HAVE_ICU #include @@ -183,7 +184,13 @@ Config::setSudoersGroup( const QString& group ) void Config::setLoginName( const QString& login ) { - if ( login != m_loginName && isEditable( QStringLiteral( "loginName" ) ) ) + if ( !isEditable( QStringLiteral( "loginName" ) ) ) + { + // Should not have arrived here anyway + QTimer::singleShot( 0, this, [=]() { emit loginNameChanged( m_loginName ); } ); + return; + } + if ( login != m_loginName ) { m_customLoginName = !login.isEmpty(); m_loginName = login; @@ -395,6 +402,8 @@ Config::setFullName( const QString& name ) { if ( !isEditable( QStringLiteral( "fullName" ) ) ) { + // Should not have arrived here anyway + QTimer::singleShot( 0, this, [=]() { emit fullNameChanged( m_fullName ); } ); return; }