Commit cc88eb13 authored by Bart Cerneels's avatar Bart Cerneels
Browse files

Force editability of playlist folders.

CCBUG: 308703
parent b94cf9f1
......@@ -358,4 +358,13 @@ PlaylistsInFoldersProxy::createNewFolder( const QString &groupName )
return addEmptyGroup( data );
}
Qt::ItemFlags PlaylistsInFoldersProxy::flags(const QModelIndex &idx) const
{
if( isGroup(idx) && idx.column() == 0)
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable |
Qt::ItemIsDropEnabled;
return QtGroupingProxy::flags(idx);
}
#include "PlaylistsInFoldersProxy.moc"
......@@ -37,6 +37,8 @@ class PlaylistsInFoldersProxy : public QtGroupingProxy
QModelIndex createNewFolder( const QString &groupName );
/* QtGroupingProxy methods */
//re-implemented to make folder name (== label) editable.
virtual Qt::ItemFlags flags(const QModelIndex &idx) const;
virtual QVariant data( const QModelIndex &idx, int role ) const;
/* QAbstractModel methods */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment