aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pyne <[email protected]>2018-12-21 19:29:24 -0500
committerMichael Pyne <[email protected]>2018-12-21 19:29:24 -0500
commitdc3124e40b736cf7706b52f906326b48fc4ff4c1 (patch)
tree8654db5c87e37a35f28f77c85a302d8793e18d40
parentf9721878bd2977a66054fe3d2a13d48a0f071bb0 (diff)
Force sorting on so that special playlist sort to top.
That is, so that special playlists hopefully sort to the top. Although the sorting of special playlists (Collection List, Play Queue, etc.) has worked for me since the port to KF5, I have a good report that it doesn't for others. The code itself appears correct but reviewing the Qt documentation indicates that QTreeWidget (which is one of the base classes for the list of playlists) doesn't sort by default. If QTreeWidget doesn't sort, then the comparison function might not be getting called at all, which would make it accident that it seems to work for me. CCBUG:402398
-rw-r--r--playlistbox.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/playlistbox.cpp b/playlistbox.cpp
index cc07fdc..2c20e96 100644
--- a/playlistbox.cpp
+++ b/playlistbox.cpp
@@ -76,6 +76,7 @@ PlaylistBox::PlaylistBox(PlayerManager *player, QWidget *parent, QStackedWidget
setRootIsDecorated(false);
setContextMenuPolicy(Qt::CustomContextMenu);
setDropIndicatorShown(true);
+ setSortingEnabled(true);
header()->blockSignals(true);
header()->hide();