Set CollectionWatcher::sValidImages directly

This commit is contained in:
Jonas Kvinge
2020-10-01 19:45:10 +02:00
parent ae6a50626d
commit b6abc34461

View File

@@ -65,7 +65,7 @@ static const char *kNoMediaFile = ".nomedia";
static const char *kNoMusicFile = ".nomusic"; static const char *kNoMusicFile = ".nomusic";
} }
QStringList CollectionWatcher::sValidImages; QStringList CollectionWatcher::sValidImages = QStringList() << "jpg" << "png" << "gif" << "jpeg";
CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent) CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent)
: QObject(parent), : QObject(parent),
@@ -90,10 +90,6 @@ CollectionWatcher::CollectionWatcher(Song::Source source, QObject *parent)
rescan_timer_->setInterval(1000); rescan_timer_->setInterval(1000);
rescan_timer_->setSingleShot(true); rescan_timer_->setSingleShot(true);
if (sValidImages.isEmpty()) {
sValidImages << "jpg" << "png" << "gif" << "jpeg";
}
ReloadSettings(); ReloadSettings();
connect(rescan_timer_, SIGNAL(timeout()), SLOT(RescanPathsNow())); connect(rescan_timer_, SIGNAL(timeout()), SLOT(RescanPathsNow()));