From kde-commits Thu Jun 09 00:30:27 2011 From: Giorgos Kylafas Date: Thu, 09 Jun 2011 00:30:27 +0000 To: kde-commits Subject: KDE/kdemultimedia/juk Message-Id: <20110609003027.7930DAC7A9 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=130757948011499 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;