Skip to content

qt: fix two playlist regressions

Fatih Uzunoğlu requested to merge fuzun/vlc:qml/playlistregressionsfix into master
  • Restore functionality of dropping input/foreign items to media library playlist view when a new playlist has to be created.
  • Restore functionality of dropping input/foreign items to any media library playlist.

Turns out we need to use QVariant because MLPlaylistListModel::append() accepts QVariantList since it actually works with multiple types (medialib item, input item, and foreign item).

And, currently for some reason, append functionality is implemented in two places: MLPlaylistListModel::create() and MLPlaylistListModel::append. The latter is able to handle different types properly while the former only supports media library items. This is bad coding, because it is code duplication for no reason. I now call MLPlaylistListModel::append() from create if there are initial items provided.

Request review @chub.

Edited by Fatih Uzunoğlu

Merge request reports

Loading