mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
always show proper credentials, update playlist when updater is removed
This commit is contained in:
parent
d61a99629f
commit
a99b35e11b
@ -358,11 +358,6 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
else if( msgType == "userChanged" )
|
||||
{
|
||||
const QString rmsg = msg.value( "msg" ).toString();
|
||||
//const QString olduser = msg.value( "oldUser" ).toString();
|
||||
//const QString newuser = msg.value( "newUser" ).toString();
|
||||
if( rmsg.isEmpty() )
|
||||
return;
|
||||
|
||||
clearUser();
|
||||
|
||||
if ( m_configWidget.data() )
|
||||
@ -372,6 +367,13 @@ SpotifyAccount::resolverMessage( const QString &msgType, const QVariantMap &msg
|
||||
}
|
||||
else if ( msgType == "loginResponse" )
|
||||
{
|
||||
QVariantHash creds = credentials();
|
||||
creds[ "username" ] = msg.value( "username" ).toString();
|
||||
creds[ "password" ] = msg.value( "password" ).toString();
|
||||
creds[ "highQuality" ] = msg.value( "highQuality" ).toString();
|
||||
setCredentials( creds );
|
||||
sync();
|
||||
|
||||
if ( m_configWidget.data() )
|
||||
{
|
||||
const bool success = msg.value( "success" ).toBool();
|
||||
|
@ -182,11 +182,8 @@ SpotifyAccountConfig::resetVerifyButton()
|
||||
void
|
||||
SpotifyAccountConfig::resetLoginButton()
|
||||
{
|
||||
if ( !m_ui->loginButton->isEnabled() )
|
||||
{
|
||||
m_ui->loginButton->setText( tr( "Log In" ) );
|
||||
m_ui->loginButton->setEnabled( true );
|
||||
}
|
||||
m_ui->loginButton->setText( tr( "Log In" ) );
|
||||
m_ui->loginButton->setEnabled( true );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -288,11 +288,20 @@ Playlist::setUpdater( PlaylistUpdaterInterface* pluinterface )
|
||||
m_updater = QWeakPointer< PlaylistUpdaterInterface >( pluinterface );
|
||||
|
||||
connect( m_updater.data(), SIGNAL( changed() ), this, SIGNAL( changed() ), Qt::UniqueConnection );
|
||||
connect( m_updater.data(), SIGNAL( destroyed( QObject* ) ), this, SLOT( updaterDestroyed() ), Qt::QueuedConnection );
|
||||
|
||||
emit changed();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::updaterDestroyed()
|
||||
{
|
||||
m_updater.clear();
|
||||
emit changed();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Playlist::loadRevision( const QString& rev )
|
||||
{
|
||||
|
@ -278,6 +278,7 @@ protected:
|
||||
private slots:
|
||||
void onResultsFound( const QList<Tomahawk::result_ptr>& results );
|
||||
void onResolvingFinished();
|
||||
void updaterDestroyed();
|
||||
|
||||
private:
|
||||
Playlist();
|
||||
|
Loading…
x
Reference in New Issue
Block a user