mirror of
https://github.com/taglib/taglib.git
synced 2025-07-14 02:54:27 -04:00
Add a mechanism for extending the file type resolution in JuK using FileRefs.
This is generally much better thought out than the current method of creating FileRefs using the native mime system and also allows for extension to additional file formats. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@437382 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
@ -39,8 +39,11 @@ public:
|
||||
}
|
||||
|
||||
File *file;
|
||||
static List<const FileTypeResolver *> fileTypeResolvers;
|
||||
};
|
||||
|
||||
List<const FileRef::FileTypeResolver *> FileRef::FileRefPrivate::fileTypeResolvers;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// public members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@ -92,6 +95,11 @@ bool FileRef::save()
|
||||
return d->file->save();
|
||||
}
|
||||
|
||||
void FileRef::addFileTypeResolver(const FileTypeResolver *resolver) // static
|
||||
{
|
||||
FileRefPrivate::fileTypeResolvers.prepend(resolver);
|
||||
}
|
||||
|
||||
bool FileRef::isNull() const
|
||||
{
|
||||
return !d->file || !d->file->isValid();
|
||||
|
Reference in New Issue
Block a user