1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

Add missing metadata so that Hatchet is shown in the Diagnostics dialog

This commit is contained in:
Uwe L. Korn
2013-09-21 00:12:45 +02:00
parent 36c34a49ed
commit a36672a3b1
3 changed files with 7 additions and 4 deletions

View File

@@ -83,6 +83,10 @@ HatchetAccount::HatchetAccount( const QString& accountId )
{
s_instance = this;
setAccountServiceName( "Hatchet" );
// We're connecting peers.
setTypes( SipType );
QFile pemFile( ":/hatchet-account/mandella.pem" );
pemFile.open( QIODevice::ReadOnly );
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "certs/mandella.pem: " << pemFile.readAll();
@@ -133,9 +137,11 @@ HatchetAccount::authenticate()
qDebug() << "Have saved credentials with auth token:" << authToken();
if ( sipPlugin() )
sipPlugin()->connectPlugin();
setAccountFriendlyName( username() );
}
else if ( !username().isEmpty() )
{
setAccountFriendlyName( username() );
// Need to re-prompt for password, since we don't save it!
}
}

View File

@@ -52,10 +52,7 @@ public:
virtual bool isUnique() const { return true; }
AccountTypes types() const { return AccountTypes( SipType ); }
// virtual bool allowUserCreation() const { return false; }
#ifndef ENABLE_HEADLESS
virtual QPixmap icon() const;
#endif
virtual Account* createAccount ( const QString& pluginId = QString() );
};

View File

@@ -56,7 +56,7 @@ enum AccountType
DLLEXPORT QString accountTypeToString( AccountType type );
Q_DECLARE_FLAGS(AccountTypes, AccountType);
Q_DECLARE_FLAGS( AccountTypes, AccountType )
inline QString generateId( const QString& factoryId )
{