diff --git a/src/libtomahawk/Result.cpp b/src/libtomahawk/Result.cpp index 62e204058..d681cca3f 100644 --- a/src/libtomahawk/Result.cpp +++ b/src/libtomahawk/Result.cpp @@ -207,6 +207,10 @@ Result::toQuery() if ( m_query.isNull() ) { m_query = Tomahawk::Query::get( artist()->name(), track(), album()->name() ); + + if ( m_query.isNull() ) + return query_ptr(); + m_query->setAlbumPos( albumpos() ); m_query->setDiscNumber( discnumber() ); m_query->setDuration( duration() ); diff --git a/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp index 7bc36806b..65efc1760 100644 --- a/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp +++ b/src/libtomahawk/accounts/spotify/SpotifyAccountConfig.cpp @@ -45,8 +45,8 @@ SpotifyAccountConfig::SpotifyAccountConfig( SpotifyAccount *account ) connect( m_ui->loginButton, SIGNAL( clicked( bool ) ), this, SLOT( doLogin() ) ); - connect( m_ui->usernameEdit, SIGNAL( textChanged( QString ) ), this, SLOT( resetLoginButton() ) ); - connect( m_ui->passwordEdit, SIGNAL( textChanged( QString ) ), this, SLOT( resetLoginButton() ) ); + connect( m_ui->usernameEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) ); + connect( m_ui->passwordEdit, SIGNAL( textEdited( QString ) ), this, SLOT( resetLoginButton() ) ); loadFromConfig(); m_playlistsLoading = new AnimatedSpinner( m_ui->playlistList ); @@ -153,6 +153,7 @@ SpotifyAccountConfig::doLogin() m_isLoggedIn = false; m_loggedInManually = false; m_verifiedUsername.clear(); + m_ui->playlistList->clear(); emit logout(); showLoggedOut(); } @@ -219,7 +220,10 @@ SpotifyAccountConfig::showLoggedOut() void SpotifyAccountConfig::resetLoginButton() { - m_ui->loginButton->setText( tr( "Log In" ) ); - m_ui->loginButton->setEnabled( true ); + if ( !m_isLoggedIn ) + { + m_ui->loginButton->setText( tr( "Log In" ) ); + m_ui->loginButton->setEnabled( true ); + } }