Commit 7c819b10 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing q_required_result

parent 1668195d
......@@ -80,13 +80,13 @@ public:
* @return a string to be shown in the status bar while hovering
* over this link.
*/
virtual QString statusBarMessage(const QUrl &url, MessageViewer::ViewerPrivate *w) const = 0;
virtual Q_REQUIRED_RESULT QString statusBarMessage(const QUrl &url, MessageViewer::ViewerPrivate *w) const = 0;
/**
* Called when shift-clicking the link in the reader.
* @return true if the click was handled by this URLHandler, false otherwise
*/
virtual bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
virtual Q_REQUIRED_RESULT bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url);
Q_UNUSED(window);
......@@ -96,7 +96,7 @@ public:
/**
* @return should return true if this URLHandler will handle the drag
*/
virtual bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
virtual Q_REQUIRED_RESULT bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url);
Q_UNUSED(window);
......@@ -108,7 +108,7 @@ public:
* If the drag is handled, you should create a drag object.
* @return true if the click was handled by this URLHandler, false otherwise
*/
virtual bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
virtual Q_REQUIRED_RESULT bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url);
Q_UNUSED(window);
......
......@@ -52,21 +52,20 @@ public:
void render(const MimeTreeParser::EncryptedMessagePart::Ptr &mp, HtmlWriter *htmlWriter);
void render(const MimeTreeParser::AlternativeMessagePart::Ptr &mp, HtmlWriter *htmlWriter);
void render(const MimeTreeParser::CertMessagePart::Ptr &mp, HtmlWriter *htmlWriter);
bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) override;
Q_REQUIRED_RESULT bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) override;
using RenderContext::renderWithFactory;
void renderFactory(const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *htmlWriter);
bool isHiddenHint(const MimeTreeParser::MessagePart::Ptr &msgPart) override;
MimeTreeParser::IconType displayHint(const MimeTreeParser::MessagePart::Ptr &msgPart) override;
bool showEmoticons() const override;
bool isPrinting() const override;
bool htmlLoadExternal() const override;
bool showExpandQuotesMark() const override;
bool showOnlyOneMimePart() const override;
bool showSignatureDetails() const override;
bool showEncryptionDetails() const override;
int levelQuote() const override;
Q_REQUIRED_RESULT bool isHiddenHint(const MimeTreeParser::MessagePart::Ptr &msgPart) override;
Q_REQUIRED_RESULT MimeTreeParser::IconType displayHint(const MimeTreeParser::MessagePart::Ptr &msgPart) override;
Q_REQUIRED_RESULT bool showEmoticons() const override;
Q_REQUIRED_RESULT bool isPrinting() const override;
Q_REQUIRED_RESULT bool htmlLoadExternal() const override;
Q_REQUIRED_RESULT bool showExpandQuotesMark() const override;
Q_REQUIRED_RESULT bool showOnlyOneMimePart() const override;
Q_REQUIRED_RESULT bool showSignatureDetails() const override;
Q_REQUIRED_RESULT bool showEncryptionDetails() const override;
Q_REQUIRED_RESULT int levelQuote() const override;
MimeTreeParser::MessagePart::Ptr mMsgPart;
CSSHelperBase *mCSSHelper = nullptr;
const MessagePartRendererFactory *mRendererFactory = nullptr;
......
......@@ -64,19 +64,19 @@ public:
virtual void renderSubParts(const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *htmlWriter) = 0;
virtual bool isHiddenHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
virtual MimeTreeParser::IconType displayHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
virtual bool showEmoticons() const = 0;
virtual bool isPrinting() const = 0;
virtual bool htmlLoadExternal() const = 0;
virtual bool showExpandQuotesMark() const = 0;
virtual bool showOnlyOneMimePart() const = 0;
virtual bool showSignatureDetails() const = 0;
virtual bool showEncryptionDetails() const = 0;
virtual int levelQuote() const = 0;
virtual Q_REQUIRED_RESULT bool isHiddenHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
virtual Q_REQUIRED_RESULT MimeTreeParser::IconType displayHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
virtual Q_REQUIRED_RESULT bool showEmoticons() const = 0;
virtual Q_REQUIRED_RESULT bool isPrinting() const = 0;
virtual Q_REQUIRED_RESULT bool htmlLoadExternal() const = 0;
virtual Q_REQUIRED_RESULT bool showExpandQuotesMark() const = 0;
virtual Q_REQUIRED_RESULT bool showOnlyOneMimePart() const = 0;
virtual Q_REQUIRED_RESULT bool showSignatureDetails() const = 0;
virtual Q_REQUIRED_RESULT bool showEncryptionDetails() const = 0;
virtual Q_REQUIRED_RESULT int levelQuote() const = 0;
protected:
virtual bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) = 0;
virtual Q_REQUIRED_RESULT bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) = 0;
};
/**
* @brief The MessagePartRendererBase class
......@@ -86,7 +86,7 @@ class MESSAGEVIEWER_EXPORT MessagePartRendererBase
public:
MessagePartRendererBase();
virtual ~MessagePartRendererBase();
virtual bool render(const MimeTreeParser::MessagePart::Ptr &, HtmlWriter *htmlWriter, RenderContext *context)
virtual Q_REQUIRED_RESULT bool render(const MimeTreeParser::MessagePart::Ptr &, HtmlWriter *htmlWriter, RenderContext *context)
const = 0;
};
}
......
......@@ -60,7 +60,7 @@ public:
static MessagePartRendererFactory *instance();
QVector<MessagePartRendererBase *> renderersForPart(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &mp) const;
Q_REQUIRED_RESULT QVector<MessagePartRendererBase *> renderersForPart(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &mp) const;
private:
Q_DISABLE_COPY(MessagePartRendererFactory)
......
......@@ -48,7 +48,7 @@ private:
QString fileName;
int size;
bool operator <(const Entry &other) const;
Q_REQUIRED_RESULT bool operator <(const Entry &other) const;
};
mutable QMap<Entry, QString> mCachedEntries;
......
......@@ -45,7 +45,7 @@ public:
void unregisterHandler(const Interface::BodyPartURLHandler *handler);
private:
QVector<const Interface::BodyPartURLHandler *> handlersForPart(KMime::Content *node) const;
Q_REQUIRED_RESULT QVector<const Interface::BodyPartURLHandler *> handlersForPart(KMime::Content *node) const;
typedef QHash<QByteArray, QVector<const Interface::BodyPartURLHandler *> > BodyPartHandlerList;
BodyPartHandlerList mHandlers;
......
......@@ -23,7 +23,6 @@
#include "messageviewer_private_export.h"
#include "config-messageviewer.h"
#include <MimeTreeParser/NodeHelper>
#include "viewer.h" //not so nice, it is actually for the enums from MailViewer
#include <PimCommon/ShareServiceUrlManager>
#include "messageviewer/viewerplugininterface.h"
......@@ -65,6 +64,7 @@ class TextToSpeechWidget;
namespace MimeTreeParser {
class ObjectTreeParser;
class NodeHelper;
}
#ifdef USE_DKIM_CHECKER
namespace MessageViewer {
......
Markdown is supported
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