mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-16 11:04:01 +02:00
Ensure we have a string to show if a Tp account name is empty.
This commit is contained in:
@@ -236,7 +236,13 @@ Tomahawk::Accounts::TelepathyConfigStorage::load( const QString& accountId, Acco
|
|||||||
|
|
||||||
Tp::AccountPtr account = m_tpam->accountForObjectPath( accountIdToTelepathyPath( accountId ) );
|
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.enabled = true;
|
||||||
cfg.acl = QVariantMap();
|
cfg.acl = QVariantMap();
|
||||||
|
Reference in New Issue
Block a user