1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

QuickShow: Use new Bitmap::is_path_a_supported_image_format method

This commit is contained in:
Hüseyin ASLITÜRK 2020-06-15 15:03:59 +03:00 committed by Andreas Kling
parent 56158a4281
commit 3a903babee

View file

@ -84,7 +84,7 @@ void QSWidget::navigate(Directions direction)
Core::DirIterator iterator(current_dir, Core::DirIterator::Flags::SkipDots);
while (iterator.has_next()) {
String file = iterator.next_full_path();
if (!file.ends_with(".png") && !file.ends_with(".gif")) // TODO: Find a batter way to filter supported images.
if (!Gfx::Bitmap::is_path_a_supported_image_format(file))
continue;
m_files_in_same_dir.append(file);
}