diff --git a/wallpapers/image/image.cpp b/wallpapers/image/image.cpp --- a/wallpapers/image/image.cpp +++ b/wallpapers/image/image.cpp @@ -76,7 +76,6 @@ m_dirWatch->startScan(); useSingleImageDefaults(); - setSingleImage(); } Image::~Image() @@ -97,6 +96,8 @@ m_ready = true; if (m_mode == SingleImage) { setSingleImage(); + } else if (m_mode == SlideShow) { + startSlideshow(); } } @@ -143,7 +144,8 @@ m_slidePaths << QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("share/wallpapers"), QStandardPaths::LocateDirectory); } - QTimer::singleShot(200, this, &Image::startSlideshow); + startSlideshow(); + updateDirWatch(m_slidePaths); updateDirWatch(m_slidePaths); } else { @@ -547,6 +549,10 @@ void Image::startSlideshow() { + if (!m_ready) { + return; + } + if(m_findToken.isEmpty()) { // populate background list m_timer.stop(); @@ -712,7 +718,7 @@ void Image::nextSlide() { - if (m_slideshowBackgrounds.isEmpty()) { + if (!m_ready || m_slideshowBackgrounds.isEmpty()) { return; }