diff --git a/messagecore/src/attachment/attachmentcompressjob.h b/messagecore/src/attachment/attachmentcompressjob.h index 73b66086..06718ff1 100644 --- a/messagecore/src/attachment/attachmentcompressjob.h +++ b/messagecore/src/attachment/attachmentcompressjob.h @@ -1,88 +1,88 @@ /* Copyright (c) 2009 Constantin Berzan This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MESSAGECORE_ATTACHMENTCOMPRESSJOB_H #define MESSAGECORE_ATTACHMENTCOMPRESSJOB_H #include "messagecore_export.h" #include "attachmentpart.h" #include namespace MessageCore { /** * @short A job to compress the attachment of an email. * * @author Constantin Berzan */ class MESSAGECORE_EXPORT AttachmentCompressJob : public KJob { Q_OBJECT public: /** * Creates a new attachment compress job. * * @param part The part of the attachment to compress. * @param parent The parent object. */ explicit AttachmentCompressJob(const AttachmentPart::Ptr &part, QObject *parent = nullptr); /** * Destroys the attachment compress job. */ ~AttachmentCompressJob() override; /** * Starts the attachment compress job. */ void start() override; /** * Sets the original @p part of the compressed attachment. */ void setOriginalPart(const AttachmentPart::Ptr &part); /** * Returns the original part of the compressed attachment. */ const AttachmentPart::Ptr originalPart() const; /** * Returns the compressed part of the attachment. * * @note does not delete it unless it failed... */ Q_REQUIRED_RESULT AttachmentPart::Ptr compressedPart() const; /** * Returns whether the compressed part is larger than the original part. */ - bool isCompressedPartLarger() const; + Q_REQUIRED_RESULT bool isCompressedPartLarger() const; private: //@cond PRIVATE class Private; Private *const d; //@endcond }; } #endif diff --git a/messageviewer/src/viewer/objecttreeviewersource.h b/messageviewer/src/viewer/objecttreeviewersource.h index 4fc31cc7..334b36b0 100644 --- a/messageviewer/src/viewer/objecttreeviewersource.h +++ b/messageviewer/src/viewer/objecttreeviewersource.h @@ -1,60 +1,60 @@ /* Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net Copyright (c) 2009 Andras Mantia This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MAILVIEWER_OBJECTTREEVIEWERSOURCE_H #define MAILVIEWER_OBJECTTREEVIEWERSOURCE_H #include "objecttreeemptysource.h" class QString; namespace MessageViewer { class AttachmentStrategy; class HtmlWriter; class ViewerPrivate; /** An ObjectTreeParser source working on a MailViewer object */ class MailViewerSource : public MessageViewer::EmptySource { public: explicit MailViewerSource(ViewerPrivate *viewer); ~MailViewerSource() override; - bool decryptMessage() const override; - bool htmlLoadExternal() const override; + Q_REQUIRED_RESULT bool decryptMessage() const override; + Q_REQUIRED_RESULT bool htmlLoadExternal() const override; void setHtmlMode(MimeTreeParser::Util::HtmlMode mode, const QList &availableModes) override; - MimeTreeParser::Util::HtmlMode preferredMode() const override; - int levelQuote() const override; + Q_REQUIRED_RESULT MimeTreeParser::Util::HtmlMode preferredMode() const override; + Q_REQUIRED_RESULT int levelQuote() const override; const QTextCodec *overrideCodec() override; - QString createMessageHeader(KMime::Message *message) override; + Q_REQUIRED_RESULT QString createMessageHeader(KMime::Message *message) override; const AttachmentStrategy *attachmentStrategy() const override; HtmlWriter *htmlWriter() const override; CSSHelperBase *cssHelper() const override; - bool autoImportKeys() const override; - bool showSignatureDetails() const override; - bool showEncryptionDetails() const override; - bool showEmoticons() const override; - bool showExpandQuotesMark() const override; - bool isPrinting() const override; + Q_REQUIRED_RESULT bool autoImportKeys() const override; + Q_REQUIRED_RESULT bool showSignatureDetails() const override; + Q_REQUIRED_RESULT bool showEncryptionDetails() const override; + Q_REQUIRED_RESULT bool showEmoticons() const override; + Q_REQUIRED_RESULT bool showExpandQuotesMark() const override; + Q_REQUIRED_RESULT bool isPrinting() const override; private: ViewerPrivate *mViewer = nullptr; }; } #endif diff --git a/messageviewer/src/widgets/mailtrackingwarningwidget.h b/messageviewer/src/widgets/mailtrackingwarningwidget.h index e920a5ae..db7ce030 100644 --- a/messageviewer/src/widgets/mailtrackingwarningwidget.h +++ b/messageviewer/src/widgets/mailtrackingwarningwidget.h @@ -1,55 +1,55 @@ /* Copyright (C) 2017-2019 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef MAILTRACKINGWARNINGWIDGET_H #define MAILTRACKINGWARNINGWIDGET_H #include #include "messageviewer_private_export.h" #include #include #include namespace MessageViewer { class MailTrackingDetailsDialog; class MESSAGEVIEWER_TESTS_EXPORT MailTrackingWarningWidget : public KMessageWidget { Q_OBJECT public: explicit MailTrackingWarningWidget(QWidget *parent = nullptr); ~MailTrackingWarningWidget(); void addTracker(const MessageViewer::BlockMailTrackingUrlInterceptor::MailTrackerBlackList &); void hideAndClear(); private: void slotShowDetails(const QString &content); - QString generateDetails() const; + Q_REQUIRED_RESULT QString generateDetails() const; struct blackListFound { QString url; int number = 1; }; QMap mBackLists; QPointer mMailTrackingDetailDialog; }; } #endif // MAILTRACKINGWARNINGWIDGET_H