diff --git a/messageviewer/autotests/setupenv.h b/messageviewer/autotests/setupenv.h --- a/messageviewer/autotests/setupenv.h +++ b/messageviewer/autotests/setupenv.h @@ -58,35 +58,35 @@ return mCSSHelper; } - bool htmlLoadExternal() Q_DECL_OVERRIDE { + bool htmlLoadExternal() const Q_DECL_OVERRIDE { return mHtmlLoadExternal; } void setHtmlLoadExternal(bool loadExternal) { mHtmlLoadExternal = loadExternal; } - bool htmlMail() Q_DECL_OVERRIDE { + bool htmlMail() const Q_DECL_OVERRIDE { return mHtmlMail; } void setHtmlMail(bool htmlMail) { mHtmlMail = htmlMail; } - bool autoImportKeys() Q_DECL_OVERRIDE + bool autoImportKeys() const Q_DECL_OVERRIDE { return true; } - bool showEmoticons() Q_DECL_OVERRIDE + bool showEmoticons() const Q_DECL_OVERRIDE { return false; } - bool showExpandQuotesMark() Q_DECL_OVERRIDE + bool showExpandQuotesMark() const Q_DECL_OVERRIDE { return false; } diff --git a/messageviewer/src/objecttreesourceif.h b/messageviewer/src/objecttreesourceif.h --- a/messageviewer/src/objecttreesourceif.h +++ b/messageviewer/src/objecttreesourceif.h @@ -58,19 +58,19 @@ virtual void setHtmlMode(MessageViewer::Util::HtmlMode mode) = 0; /** Return true if the mail should be parsed as a html mail */ - virtual bool htmlMail() = 0; + virtual bool htmlMail() const = 0; /** Return true if an encrypted mail should be decrypted */ - virtual bool decryptMessage() = 0; + virtual bool decryptMessage() const = 0; /** Return true if external sources should be loaded in a html mail */ - virtual bool htmlLoadExternal() = 0; + virtual bool htmlLoadExternal() const = 0; /** Return true to include the signature details in the generated html */ - virtual bool showSignatureDetails() = 0; + virtual bool showSignatureDetails() const = 0; - virtual int levelQuote() = 0; + virtual int levelQuote() const = 0; /** The override codec that should be used for the mail */ virtual const QTextCodec *overrideCodec() = 0; @@ -90,11 +90,11 @@ virtual QObject *sourceObject() = 0; /** should keys be imported automatically **/ - virtual bool autoImportKeys() = 0; + virtual bool autoImportKeys() const = 0; - virtual bool showEmoticons() = 0; + virtual bool showEmoticons() const = 0; - virtual bool showExpandQuotesMark() = 0; + virtual bool showExpandQuotesMark() const = 0; }; } diff --git a/messageviewer/src/viewer/objecttreeemptysource.h b/messageviewer/src/viewer/objecttreeemptysource.h --- a/messageviewer/src/viewer/objecttreeemptysource.h +++ b/messageviewer/src/viewer/objecttreeemptysource.h @@ -34,23 +34,23 @@ public: EmptySource(); ~EmptySource(); - bool htmlMail() Q_DECL_OVERRIDE; - bool decryptMessage() Q_DECL_OVERRIDE; - bool htmlLoadExternal() Q_DECL_OVERRIDE; - bool showSignatureDetails() Q_DECL_OVERRIDE; + bool htmlMail() const Q_DECL_OVERRIDE; + bool decryptMessage() const Q_DECL_OVERRIDE; + bool htmlLoadExternal() const Q_DECL_OVERRIDE; + bool showSignatureDetails() const Q_DECL_OVERRIDE; void setHtmlMode(MessageViewer::Util::HtmlMode mode) Q_DECL_OVERRIDE; void setAllowDecryption(bool allowDecryption); - int levelQuote() Q_DECL_OVERRIDE; + int levelQuote() const Q_DECL_OVERRIDE; const QTextCodec *overrideCodec() Q_DECL_OVERRIDE; QString createMessageHeader(KMime::Message *message) Q_DECL_OVERRIDE; const AttachmentStrategy *attachmentStrategy() Q_DECL_OVERRIDE; HtmlWriter *htmlWriter() Q_DECL_OVERRIDE; CSSHelperBase *cssHelper() Q_DECL_OVERRIDE; QObject *sourceObject() Q_DECL_OVERRIDE; - bool autoImportKeys() Q_DECL_OVERRIDE; - bool showEmoticons() Q_DECL_OVERRIDE; - bool showExpandQuotesMark() Q_DECL_OVERRIDE; + bool autoImportKeys() const Q_DECL_OVERRIDE; + bool showEmoticons() const Q_DECL_OVERRIDE; + bool showExpandQuotesMark() const Q_DECL_OVERRIDE; private: EmptySourcePrivate *const d; }; diff --git a/messageviewer/src/viewer/objecttreeemptysource.cpp b/messageviewer/src/viewer/objecttreeemptysource.cpp --- a/messageviewer/src/viewer/objecttreeemptysource.cpp +++ b/messageviewer/src/viewer/objecttreeemptysource.cpp @@ -47,22 +47,22 @@ delete d; } -bool EmptySource::htmlMail() +bool EmptySource::htmlMail() const { return true; } -bool EmptySource::decryptMessage() +bool EmptySource::decryptMessage() const { return d->mAllowDecryption; } -bool EmptySource::htmlLoadExternal() +bool EmptySource::htmlLoadExternal() const { return false; } -bool EmptySource::showSignatureDetails() +bool EmptySource::showSignatureDetails() const { return false; } @@ -77,7 +77,7 @@ d->mAllowDecryption = allowDecryption; } -int EmptySource::levelQuote() +int EmptySource::levelQuote() const { return 1; } @@ -113,17 +113,17 @@ return 0; } -bool EmptySource::autoImportKeys() +bool EmptySource::autoImportKeys() const { return true; } -bool EmptySource::showEmoticons() +bool EmptySource::showEmoticons() const { return false; } -bool EmptySource::showExpandQuotesMark() +bool EmptySource::showExpandQuotesMark() const { return false; } diff --git a/messageviewer/src/viewer/objecttreeviewersource.h b/messageviewer/src/viewer/objecttreeviewersource.h --- a/messageviewer/src/viewer/objecttreeviewersource.h +++ b/messageviewer/src/viewer/objecttreeviewersource.h @@ -35,22 +35,22 @@ public: explicit MailViewerSource(ViewerPrivate *viewer); ~MailViewerSource(); - bool htmlMail() Q_DECL_OVERRIDE; - bool decryptMessage() Q_DECL_OVERRIDE; - bool htmlLoadExternal() Q_DECL_OVERRIDE; - bool showSignatureDetails() Q_DECL_OVERRIDE; + bool htmlMail() const Q_DECL_OVERRIDE; + bool decryptMessage() const Q_DECL_OVERRIDE; + bool htmlLoadExternal() const Q_DECL_OVERRIDE; + bool showSignatureDetails() const Q_DECL_OVERRIDE; void setHtmlMode(Util::HtmlMode mode) Q_DECL_OVERRIDE; - int levelQuote() Q_DECL_OVERRIDE; + int levelQuote() const Q_DECL_OVERRIDE; const QTextCodec *overrideCodec() Q_DECL_OVERRIDE; QString createMessageHeader(KMime::Message *message) Q_DECL_OVERRIDE; const AttachmentStrategy *attachmentStrategy() Q_DECL_OVERRIDE; HtmlWriter *htmlWriter() Q_DECL_OVERRIDE; CSSHelperBase *cssHelper() Q_DECL_OVERRIDE; QObject *sourceObject() Q_DECL_OVERRIDE; - bool autoImportKeys() Q_DECL_OVERRIDE; - bool showEmoticons() Q_DECL_OVERRIDE; - bool showExpandQuotesMark() Q_DECL_OVERRIDE; + bool autoImportKeys() const Q_DECL_OVERRIDE; + bool showEmoticons() const Q_DECL_OVERRIDE; + bool showExpandQuotesMark() const Q_DECL_OVERRIDE; private: ViewerPrivate *mViewer; }; diff --git a/messageviewer/src/viewer/objecttreeviewersource.cpp b/messageviewer/src/viewer/objecttreeviewersource.cpp --- a/messageviewer/src/viewer/objecttreeviewersource.cpp +++ b/messageviewer/src/viewer/objecttreeviewersource.cpp @@ -34,22 +34,22 @@ { } -bool MailViewerSource::htmlMail() +bool MailViewerSource::htmlMail() const { return mViewer->htmlMail(); } -bool MailViewerSource::decryptMessage() +bool MailViewerSource::decryptMessage() const { return mViewer->decryptMessage(); } -bool MailViewerSource::htmlLoadExternal() +bool MailViewerSource::htmlLoadExternal() const { return mViewer->htmlLoadExternal(); } -bool MailViewerSource::showSignatureDetails() +bool MailViewerSource::showSignatureDetails() const { return mViewer->mShowSignatureDetails; } @@ -59,7 +59,7 @@ mViewer->mColorBar->setMode(mode); } -int MailViewerSource::levelQuote() +int MailViewerSource::levelQuote() const { return mViewer->mLevelQuote; } @@ -94,17 +94,17 @@ return mViewer->cssHelper(); } -bool MailViewerSource::autoImportKeys() +bool MailViewerSource::autoImportKeys() const { return MessageViewer::MessageViewerSettings::self()->autoImportKeys(); } -bool MailViewerSource::showEmoticons() +bool MailViewerSource::showEmoticons() const { return MessageViewer::MessageViewerSettings::self()->showEmoticons(); } -bool MailViewerSource::showExpandQuotesMark() +bool MailViewerSource::showExpandQuotesMark() const { return MessageViewer::MessageViewerSettings::self()->showExpandQuotesMark(); }