[pim/trojita] src/Imap/Model: Make getters methods instead of slots
Espen Sandøy Hustad <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 2eb601831846a28436a3bfb892d8786ff0c849b0 by Espen Sandøy Hustad.
Committed on 09/08/2026 at 07:43.
Pushed by ehustad into branch 'master'.
Make getters methods instead of slots
These getters are not actually used as slots.
Fix Clazy warnings:
- src/Imap/Model/Model.h:310:5: warning: getter Imap::Mailbox::Model::taskModel
possibly mismarked as a slot [-Wclazy-const-signal-or-slot]
- src/Imap/Model/Model.h:316:5: warning: getter
Imap::Mailbox::Model::imapAuthError possibly mismarked as a slot
[-Wclazy-const-signal-or-slot]
- src/Imap/Parser/../Model/Model.h:310:5: warning: getter
Imap::Mailbox::Model::taskModel possibly mismarked as a slot
[-Wclazy-const-signal-or-slot]
- src/Imap/Parser/../Model/Model.h:316:5: warning: getter
Imap::Mailbox::Model::imapAuthError possibly mismarked as a slot
[-Wclazy-const-signal-or-slot]
- src/Imap/Tasks/../Model/Model.h:310:5: warning: getter
Imap::Mailbox::Model::taskModel possibly mismarked as a slot
[-Wclazy-const-signal-or-slot]
- src/Imap/Tasks/../Model/Model.h:316:5: warning: getter
Imap::Mailbox::Model::imapAuthError possibly mismarked as a slot
[-Wclazy-const-signal-or-slot]
M +9 -9 src/Imap/Model/Model.h
https://invent.kde.org/pim/trojita/-/commit/2eb601831846a28436a3bfb892d8786ff0c849b0
diff --git a/src/Imap/Model/Model.h b/src/Imap/Model/Model.h
index 080953931..7d5ad9390 100644
--- a/src/Imap/Model/Model.h
+++ b/src/Imap/Model/Model.h
@@ -290,6 +290,15 @@ public:
void setNumberRefreshInterval(const int interval);
+ /** @short Get a pointer to the model visualizing the state of the tasks
+
+ The returned object still belongs to this Imap::Mailbox::Model, and its internal working is implementation-specific. The only
+ valid method of access is through the usual Qt Interview framework.
+ */
+ [[nodiscard]] QAbstractItemModel *taskModel() const;
+
+ QString imapAuthError() const;
+
public slots:
/** @short Ask for an updated list of mailboxes on the server */
void reloadMailboxList();
@@ -302,19 +311,10 @@ public slots:
*/
void switchToMailbox(const QModelIndex &mbox);
- /** @short Get a pointer to the model visualizing the state of the tasks
-
- The returned object still belongs to this Imap::Mailbox::Model, and its internal working is implementation-specific. The only
- valid method of access is through the usual Qt Interview framework.
- */
- QAbstractItemModel *taskModel() const;
-
void setSslPolicy(const QList<QSslCertificate> &sslChain, const QList<QSslError> &sslErrors, bool proceed);
void invalidateAllMessageCounts();
- QString imapAuthError() const;
-
private slots:
/** @short Helper for low-level state change propagation */
void handleSocketStateChanged(Imap::Parser *parser, Imap::ConnectionState state);