plasma: build fixes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-05-17 07:11:33 +03:00
parent 3f463fe412
commit f905ee4420
3 changed files with 6 additions and 3 deletions

View file

@ -58,7 +58,12 @@ void AniPaper::paint(QPainter *painter, const QRectF &exposedRect)
void AniPaper::slotTimeout()
{
m_imagereader.jumpToNextImage();
const int nextimage = (m_imagereader.currentImageNumber() + 1);
if (nextimage > m_imagereader.imageCount()) {
m_imagereader.jumpToImage(0);
} else {
m_imagereader.jumpToImage(nextimage);
}
emit update(QRectF());
}

View file

@ -22,7 +22,6 @@
#include <QTimer>
#include <QImageReader>
#include <Plasma/Wallpaper>
#include <Plasma/DataEngine>
class AniPaper : public Plasma::Wallpaper
{

View file

@ -23,7 +23,6 @@
#include <QProcess>
#include <QTimer>
#include <Plasma/Wallpaper>
#include <Plasma/DataEngine>
class XWallpaper : public Plasma::Wallpaper
{