[multimedia/kasts] src: Apply code checker suggestions

Bart De Vries <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit ecb297ad1d53f54ba1bb961fe2dc55a5a858e0f9 by Bart De Vries.
Committed on 30/07/2026 at 15:57.
Pushed by bdevries into branch 'master'.

Apply code checker suggestions

- Initialize booleans properly
- Make arguments const

M  +5    -5    src/entry.cpp
M  +3    -3    src/entry.h

https://invent.kde.org/multimedia/kasts/-/commit/ecb297ad1d53f54ba1bb961fe2dc55a5a858e0f9

diff --git a/src/entry.cpp b/src/entry.cpp
index 852acec1..b885561f 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -29,30 +29,30 @@ Entry::Entry(const qint64 entryuid, QObject *parent)
 
     qCDebug(kastsObjects) << "Entry object" << m_entryuid << "constructed";
 
-    connect(&DataManager::instance(), &DataManager::entryReadStatusChanged, this, [this](bool state, const QList<qint64> &entryuids) {
+    connect(&DataManager::instance(), &DataManager::entryReadStatusChanged, this, [this](const bool state, const QList<qint64> &entryuids) {
         if (entryuids.contains(m_entryuid) && state != m_read) {
             m_read = state;
             Q_EMIT readChanged(m_read);
         }
     });
-    connect(&DataManager::instance(), &DataManager::entryNewStatusChanged, this, [this](bool state, const QList<qint64> &entryuids) {
+    connect(&DataManager::instance(), &DataManager::entryNewStatusChanged, this, [this](const bool state, const QList<qint64> &entryuids) {
         if (entryuids.contains(m_entryuid) && state != m_new) {
             m_new = state;
             Q_EMIT newChanged(m_new);
         }
     });
-    connect(&DataManager::instance(), &DataManager::entryFavoriteStatusChanged, this, [this](bool state, const QList<qint64> &entryuids) {
+    connect(&DataManager::instance(), &DataManager::entryFavoriteStatusChanged, this, [this](const bool state, const QList<qint64> &entryuids) {
         if (entryuids.contains(m_entryuid) && state != m_favorite) {
             m_favorite = state;
             Q_EMIT favoriteChanged(m_favorite);
         }
     });
-    connect(&DataManager::instance(), &DataManager::entryQueueStatusChanged, this, [this](bool state, const QList<qint64> &entryuids) {
+    connect(&DataManager::instance(), &DataManager::entryQueueStatusChanged, this, [this](const bool state, const QList<qint64> &entryuids) {
         if (entryuids.contains(m_entryuid)) {
             Q_EMIT queueStatusChanged(state);
         }
     });
-    connect(&Fetcher::instance(), &Fetcher::downloadFinished, this, [this](QString url) {
+    connect(&Fetcher::instance(), &Fetcher::downloadFinished, this, [this](const QString url) {
         if (url == m_image) {
             Q_EMIT imageChanged(url);
             Q_EMIT cachedImageChanged(cachedImage());
diff --git a/src/entry.h b/src/entry.h
index 5d15c085..d286bdf5 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -111,9 +111,9 @@ private:
     QDateTime m_created;
     QDateTime m_updated;
     QString m_link;
-    bool m_read;
-    bool m_new;
-    bool m_favorite;
+    bool m_read = false;
+    bool m_new = false;
+    bool m_favorite = false;
     Enclosure *m_enclosure = nullptr;
     QString m_image;
     bool m_hasenclosure = false;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.