Commit 6e05e69f authored by Laurent Montel's avatar Laurent Montel
Browse files

Add more Q_REQUIRED_RESULT + const'ify pointer

parent 3b5c6a25
Pipeline #224540 passed with stage
in 17 minutes and 1 second
......@@ -95,10 +95,9 @@ public:
* Returns the expanded Reply-To field
*/
Q_REQUIRED_RESULT QStringList expandedReplyTo() const;
private Q_SLOTS:
void slotAliasExpansionDone(KJob *);
private:
void slotAliasExpansionDone(KJob *);
std::unique_ptr<EmailAddressResolveJobPrivate> const d;
};
}
......@@ -33,15 +33,11 @@ public:
~InsertTextFileJob() override;
void setEncoding(const QString &encoding);
void start() override;
private Q_SLOTS:
private:
void slotGetJobFinished(KJob *job);
void slotFileData(KIO::Job *job, const QByteArray &data);
private:
std::unique_ptr<InsertTextFileJobPrivate> const d;
};
}
......@@ -20,12 +20,9 @@ public:
~SaveContactPreferenceJob() override;
void start();
private Q_SLOTS:
private:
void slotSearchContact(KJob *job);
void slotModifyCreateItem(KJob *job);
private:
void writeCustomContactProperties(KContacts::Addressee &contact, const Kleo::KeyResolver::ContactPreferences &pref) const;
const QString mEmail;
const Kleo::KeyResolver::ContactPreferences mPref;
......
......@@ -29,12 +29,10 @@ public Q_SLOTS:
void slotUser1();
void slotTitleChanged(const QString &);
private Q_SLOTS:
private:
void slotDelayedSetRecipients(KJob *);
void slotDelayedUser1(KJob *);
void slotContactGroupCreateJobResult(KJob *);
private:
void readConfig();
void writeConfig();
......
......@@ -55,10 +55,7 @@ private:
*/
void sendOrQueueMessage(const KMime::Message::Ptr &msg, MessageComposer::MessageSender::SendMethod method = MessageComposer::MessageSender::SendDefault);
private Q_SLOTS:
void queueJobResult(KJob *job);
private:
std::unique_ptr<AkonadiSenderPrivate> const d;
};
}
......@@ -78,7 +78,7 @@ public:
/**
* Returns the GroupSorting
*/
GroupSorting groupSorting() const;
Q_REQUIRED_RESULT GroupSorting groupSorting() const;
/**
* Sets the GroupSorting option.
......@@ -90,7 +90,7 @@ public:
/**
* Returns the current group SortDirection.
*/
SortDirection groupSortDirection() const;
Q_REQUIRED_RESULT SortDirection groupSortDirection() const;
/**
* Sets the SortDirection for the groups.
......@@ -101,7 +101,7 @@ public:
/**
* Returns the current message sorting option
*/
MessageSorting messageSorting() const;
Q_REQUIRED_RESULT MessageSorting messageSorting() const;
/**
* Sets the current message sorting option
......@@ -111,7 +111,7 @@ public:
/**
* Returns the current message SortDirection.
*/
SortDirection messageSortDirection() const;
Q_REQUIRED_RESULT SortDirection messageSortDirection() const;
/**
* Sets the SortDirection for the message.
......@@ -124,7 +124,7 @@ public:
* The returned descriptors are pairs in that the first item is the localized description
* of the option value and the second item is the integer option value itself.
*/
static QVector<QPair<QString, int>> enumerateMessageSortingOptions(Aggregation::Threading t);
Q_REQUIRED_RESULT static QVector<QPair<QString, int>> enumerateMessageSortingOptions(Aggregation::Threading t);
/**
* Enumerates the available message sorting directions for the specified MessageSorting option.
......@@ -132,7 +132,7 @@ public:
* of the option value and the second item is the integer option value itself.
* If the returned list is empty then the value of the option is meaningless in the current context.
*/
static QVector<QPair<QString, int>> enumerateMessageSortDirectionOptions(MessageSorting ms);
Q_REQUIRED_RESULT static QVector<QPair<QString, int>> enumerateMessageSortDirectionOptions(MessageSorting ms);
/**
* Enumerates the group sorting options compatible with the specified Grouping.
......@@ -140,7 +140,7 @@ public:
* of the option value and the second item is the integer option value itself.
* If the returned list is empty then the value of the option is meaningless in the current context.
*/
static QVector<QPair<QString, int>> enumerateGroupSortingOptions(Aggregation::Grouping g);
Q_REQUIRED_RESULT static QVector<QPair<QString, int>> enumerateGroupSortingOptions(Aggregation::Grouping g);
/**
* Enumerates the group sort direction options compatible with the specified Grouping and GroupSorting.
......@@ -148,7 +148,7 @@ public:
* of the option value and the second item is the integer option value itself.
* If the returned list is empty then the value of the option is meaningless in the current context.
*/
static QVector<QPair<QString, int>> enumerateGroupSortDirectionOptions(Aggregation::Grouping g, GroupSorting groupSorting);
Q_REQUIRED_RESULT static QVector<QPair<QString, int>> enumerateGroupSortDirectionOptions(Aggregation::Grouping g, GroupSorting groupSorting);
/**
* Checks if this sort order can be used in combination with the given aggregation.
......@@ -164,7 +164,7 @@ public:
* will be based on that old sort order, i.e. the message sorting and
* message sort direction is adopted.
*/
static SortOrder defaultForAggregation(const Aggregation *aggregation, SortOrder oldSortOrder);
Q_REQUIRED_RESULT static SortOrder defaultForAggregation(const Aggregation *aggregation, SortOrder oldSortOrder);
/**
* Returns true if the ms parameter specifies a valid MessageSorting option.
......
......@@ -244,7 +244,7 @@ public:
/**
* Returns the type of this content item
*/
Type type() const;
Q_REQUIRED_RESULT Type type() const;
/**
* Returns true if this ContentItem can be in a "disabled" state.
......@@ -252,38 +252,38 @@ public:
* message has no attachments. For such items the HideWhenDisabled
* and SoftenByBlendingWhenDisabled flags are meaningful.
*/
bool canBeDisabled() const;
Q_REQUIRED_RESULT bool canBeDisabled() const;
/**
* Returns true if this ContentItem can make use of a custom color.
*/
bool canUseCustomColor() const;
Q_REQUIRED_RESULT bool canUseCustomColor() const;
/**
* Returns true if this item displays some kind of text.
* Items that display text make use of the customFont() setting.
*/
bool displaysText() const;
Q_REQUIRED_RESULT bool displaysText() const;
/**
* Returns true if this item displays a long text.
* The returned value makes sense only if displaysText() returned true.
*/
bool displaysLongText() const;
Q_REQUIRED_RESULT bool displaysLongText() const;
/**
* Returns true if this item displays an icon.
*/
bool isIcon() const;
Q_REQUIRED_RESULT bool isIcon() const;
/**
* Returns true if clicking on this kind of item can perform an action
*/
bool isClickable() const;
Q_REQUIRED_RESULT bool isClickable() const;
/**
* Returns true if this item is a small spacer
*/
bool isSpacer() const;
Q_REQUIRED_RESULT bool isSpacer() const;
/**
* Static test that returns true if an instance of ContentItem with the
......
......@@ -193,7 +193,7 @@ public:
* but may contain less (even 0) if these MessageItem object were removed
* from the view for some reason.
*/
QList<MessageItem *> persistentSetCurrentMessageItemList(MessageItemSetReference ref);
Q_REQUIRED_RESULT QList<MessageItem *> persistentSetCurrentMessageItemList(MessageItemSetReference ref);
/**
* Deletes the persistent set pointed by the specified reference.
......
......@@ -39,11 +39,9 @@ public:
void setCollection(const Akonadi::Collection &collection);
private Q_SLOTS:
private:
void queryRootCollectionFetchFinished(KJob *job);
void queryCollectionFetchFinished(KJob *job);
private:
Akonadi::CollectionFetchJob *fetchCollections(const Akonadi::Collection::List &cols, bool recursive);
void queryIndexerStatus();
......
......@@ -49,12 +49,10 @@ protected:
void contextMenuEvent(QContextMenuEvent *e) override;
void keyPressEvent(QKeyEvent *e) override;
private Q_SLOTS:
private:
void slotToggledLockAction();
void showMenu();
void slotFilterActionClicked(QAction *act);
private:
void clearFilterAction();
void createFilterAction(const QIcon &icon, const QString &text, int value);
void createMenuSearch();
......
......@@ -34,10 +34,8 @@ public:
void setDelayRemoveAllInMs(int ms);
private Q_SLOTS:
void slotRemoveTempFiles();
private:
void slotRemoveTempFiles();
std::unique_ptr<AttachmentTemporaryFilesDirsPrivate> const d;
};
}
......@@ -40,12 +40,10 @@ Q_SIGNALS:
void replyAllTemplateSelected(const QString &tmpl);
void forwardTemplateSelected(const QString &tmpl);
private Q_SLOTS:
private:
void slotReplySelected(int idx);
void slotReplyAllSelected(int idx);
void slotForwardSelected(int idx);
private:
void clear();
std::unique_ptr<CustomTemplatesMenuPrivate> const d;
};
......
......@@ -42,13 +42,11 @@ public Q_SLOTS:
void slotInsertCommand(const QString &cmd, int adjustCursor = 0);
void slotTextChanged();
private Q_SLOTS:
void slotHelpLinkClicked(const QString &);
Q_SIGNALS:
void changed();
private:
void slotHelpLinkClicked(const QString &);
Q_REQUIRED_RESULT QPlainTextEdit *currentTextEdit() const;
Q_REQUIRED_RESULT QString strOrBlank(const QString &str);
std::unique_ptr<TemplatesConfigurationPrivate> const d;
......
......@@ -39,12 +39,10 @@ Q_SIGNALS:
void result(WebEngineViewer::CheckPhishingUrlUtil::UrlStatus status, const QUrl &url, uint verifyCacheAfterThisTime = 0);
void debugJson(const QByteArray &ba);
private Q_SLOTS:
private:
void slotSslErrors(QNetworkReply *reply, const QList<QSslError> &error);
void slotError(QNetworkReply::NetworkError error);
void slotCheckUrlFinished(QNetworkReply *reply);
private:
std::unique_ptr<CheckPhishingUrlJobPrivate> const d;
};
}
......@@ -40,12 +40,11 @@ Q_SIGNALS:
void result(WebEngineViewer::CheckPhishingUrlUtil::UrlStatus status, const QUrl &url);
void debugJson(const QByteArray &ba);
private Q_SLOTS:
private:
void slotSslErrors(QNetworkReply *reply, const QList<QSslError> &error);
void slotError(QNetworkReply::NetworkError error);
void slotCheckUrlFinished(QNetworkReply *reply);
private:
Q_DISABLE_COPY(SearchFullHashJob)
std::unique_ptr<SearchFullHashJobPrivate> const d;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment