1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 14:46:33 +02:00

Only query configWidget if there is one

This commit is contained in:
Uwe L. Korn
2014-07-31 20:30:39 +01:00
parent eb7f142e83
commit 9caad18c9d

View File

@@ -442,7 +442,11 @@ SpotifyAccount::privateModeChanged()
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Sending privateMode"; tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Sending privateMode";
QVariantMap msg; QVariantMap msg;
msg[ "_msgtype" ] = "setPrivacyMode"; msg[ "_msgtype" ] = "setPrivacyMode";
msg[ "private" ] = ( m_configWidget.data()->persitentPrivacy() || TomahawkSettings::instance()->privateListeningMode() != TomahawkSettings::PublicListening ); bool _private = TomahawkSettings::instance()->privateListeningMode() != TomahawkSettings::PublicListening;
if ( m_configWidget) {
_private |= m_configWidget->persitentPrivacy();
}
msg[ "private" ] = _private;
sendMessage( msg ); sendMessage( msg );
} }