chore: add webp to default image queue filter list

This commit is contained in:
Gary Wang
2021-02-26 00:57:12 +08:00
parent 6316431dcc
commit 9c460f2ede
4 changed files with 22 additions and 5 deletions

View File

@ -27,6 +27,16 @@ PlaylistManager::PlaylistType PlaylistManager::playlistType() const
return m_type;
}
QStringList PlaylistManager::autoLoadFilterSuffix() const
{
return m_autoLoadSuffix;
}
void PlaylistManager::setAutoLoadFilterSuffix(const QStringList & nameFilters)
{
m_autoLoadSuffix = nameFilters;
}
void PlaylistManager::clear()
{
m_currentIndex = -1;
@ -50,8 +60,9 @@ void PlaylistManager::setCurrentFile(const QString & filePath)
int index = indexOf(filePath);
m_currentIndex = index == -1 ? appendFile(filePath) : index;
} else {
QStringList entryList = dir.entryList({"*.jpg", "*.jpeg", "*.jfif", "*.png", "*.gif", "*.svg", "*.bmp"},
QDir::Files | QDir::NoSymLinks, QDir::NoSort);
QStringList entryList = dir.entryList(
m_autoLoadSuffix,
QDir::Files | QDir::NoSymLinks, QDir::NoSort);
QCollator collator;
collator.setNumericMode(true);