Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Never try to store the state for an empty playlist guid.

  • Loading branch information...
commit 55821c61def9fbaf3e12660a8a4b7623bb41e202 1 parent a738ab6
@muesli muesli authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/libtomahawk/TomahawkSettings.cpp
View
7 src/libtomahawk/TomahawkSettings.cpp
@@ -972,6 +972,9 @@ TomahawkSettings::playlistColumnSizes( const QString& playlistid ) const
void
TomahawkSettings::setPlaylistColumnSizes( const QString& playlistid, const QByteArray& state )
{
+ if ( playlistid.isEmpty() )
+ return;
+
setValue( QString( "ui/playlist/%1/columnSizes" ).arg( playlistid ), state );
}
@@ -979,7 +982,7 @@ TomahawkSettings::setPlaylistColumnSizes( const QString& playlistid, const QByte
bool
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
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();
}
Please sign in to comment.
Something went wrong with that request. Please try again.