mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-10 08:04:25 +02:00
* Never try to store the state for an empty playlist guid.
This commit is contained in:
@@ -972,6 +972,9 @@ TomahawkSettings::playlistColumnSizes( const QString& playlistid ) const
|
|||||||
void
|
void
|
||||||
TomahawkSettings::setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state )
|
TomahawkSettings::setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state )
|
||||||
{
|
{
|
||||||
|
if ( playlistid.isEmpty() )
|
||||||
|
return;
|
||||||
|
|
||||||
setValue( QString( "ui/playlist/%1/columnSizes" ).arg( playlistid ), state );
|
setValue( QString( "ui/playlist/%1/columnSizes" ).arg( playlistid ), state );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -979,7 +982,7 @@ TomahawkSettings::setPlaylistColumnSizes( const QString& playlistid, const QByte
|
|||||||
bool
|
bool
|
||||||
TomahawkSettings::shuffleState( const QString& playlistid ) const
|
TomahawkSettings::shuffleState( const QString& playlistid ) const
|
||||||
{
|
{
|
||||||
return value( QString( "ui/playlist/%1/shuffleState" ).arg( playlistid )).toBool();
|
return value( QString( "ui/playlist/%1/shuffleState" ).arg( playlistid ) ).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1008,7 +1011,7 @@ TomahawkSettings::setRepeatMode( const QString& playlistid, Tomahawk::PlaylistMo
|
|||||||
Tomahawk::PlaylistModes::RepeatMode
|
Tomahawk::PlaylistModes::RepeatMode
|
||||||
TomahawkSettings::repeatMode( const QString& playlistid )
|
TomahawkSettings::repeatMode( const QString& playlistid )
|
||||||
{
|
{
|
||||||
return (PlaylistModes::RepeatMode)value( QString( "ui/playlist/%1/repeatMode" ).arg( playlistid )).toInt();
|
return (PlaylistModes::RepeatMode)value( QString( "ui/playlist/%1/repeatMode" ).arg( playlistid ) ).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user