[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdemultimedia/juk
From:       Giorgos Kylafas <gekylafas () gmail ! com>
Date:       2011-06-09 0:30:27
Message-ID: 20110609003027.7930DAC7A9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1235751 by kylafas:

juk: keep the order of tracks when loading a plain playlist.

Plain Playlists are saved by explicitly writting the filenames of the
tracks they contain (in contrast, SearchPlaylists store only their
search pattern and FolderPlaylists only their folder). The filenames are
written to the disk in the order they appear in the playlist.

So, when loading such Playlists, disable sorting before adding the
tracks, so that they appear in the order they were saved.

CCBUG: 70402

 M  +3 -2      playlist.cpp  


--- trunk/KDE/kdemultimedia/juk/playlist.cpp #1235750:1235751
@@ -1251,8 +1251,6 @@
 
 void Playlist::read(QDataStream &s)
 {
-    QString buffer;
-
     s >> m_playlistName
       >> m_fileName;
 
@@ -1260,6 +1258,9 @@
     if(m_playlistName.isEmpty())
         throw BICStreamException();
 
+    // Do not sort. Add the files in the order they were saved.
+    setSorting(columns() + 1);
+
     QStringList files;
     s >> files;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic