mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-02-26 21:03:31 +01:00
Ensure we have a string to show if a Tp account name is empty.
This commit is contained in:
parent
b08ba3fe40
commit
484b7ccb88
@ -236,7 +236,13 @@ Tomahawk::Accounts::TelepathyConfigStorage::load( const QString& accountId, Acco
|
||||
|
||||
Tp::AccountPtr account = m_tpam->accountForObjectPath( accountIdToTelepathyPath( accountId ) );
|
||||
|
||||
cfg.accountFriendlyName = "Tp:" + account->normalizedName();
|
||||
if ( !account->normalizedName().isEmpty() )
|
||||
cfg.accountFriendlyName = account->normalizedName();
|
||||
else if ( !account->parameters()[ "account" ].isNull() )
|
||||
cfg.accountFriendlyName = account->parameters()[ "account" ].toString();
|
||||
|
||||
if ( cfg.accountFriendlyName.isEmpty() ) //this should never happen
|
||||
cfg.accountFriendlyName = accountId;
|
||||
|
||||
cfg.enabled = true;
|
||||
cfg.acl = QVariantMap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user