Commit 533acb77 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵
Browse files

allow to test for presence of data in MusicDataType

parent 6316af64
......@@ -83,11 +83,21 @@ public:
public:
using DataType::DataType;
bool hasDatabaseId() const
{
return find(key_type::DatabaseIdRole) != end();
}
qulonglong databaseId() const
{
return operator[](key_type::DatabaseIdRole).toULongLong();
}
bool hasElementType() const
{
return find(key_type::ElementTypeRole) != end();
}
ElisaUtils::PlayListEntryType elementType() const
{
return operator[](key_type::ElementTypeRole).value<ElisaUtils::PlayListEntryType>();
......
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