From 4004124a33afb7acab783e38f57b19518dabeb8e Mon Sep 17 00:00:00 2001 From: Digital Artifex <7929434+DigitalArtifex@users.noreply.github.com> Date: Tue, 9 Jun 2026 00:25:43 -0400 Subject: [PATCH] Added comparison operators --- KomplexHubPlugin/common/wallpapercache.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/KomplexHubPlugin/common/wallpapercache.h b/KomplexHubPlugin/common/wallpapercache.h index 6d7b06d..98156ff 100644 --- a/KomplexHubPlugin/common/wallpapercache.h +++ b/KomplexHubPlugin/common/wallpapercache.h @@ -50,6 +50,28 @@ struct KOMPLEX_EXPORT WallpaperCache QString currency; quint64 downloadCount = 0; qint8 type = -1; + + auto operator == (const WallpaperCache &other) const -> bool + { + return ( + other.uri == uri && + other.name == name && + other.author == author && + other.authorId == authorId && + other.description == description && + other.thumbnail == thumbnail && + other.createdDate == createdDate && + other.price == price && + other.currency == currency && + other.downloadCount == downloadCount && + other.type == type + ); + } + + auto operator != (const WallpaperCache &other) const -> bool + { + return !(other == *this); + } }; Q_DECLARE_METATYPE(WallpaperCache)