Commit 98d36087 authored by Fabian Vogt's avatar Fabian Vogt
Browse files

Fix build with GCC 12 (standard attributes in middle of decl-specifiers)

"static Q_REQUIRED_RESULT foo bar();" -> "Q_REQUIRED_RESULT static foo bar();"

(cherry picked from commit f1fee4a1)
parent 951be0cf
Pipeline #124781 passed with stage
in 19 minutes and 53 seconds
......@@ -25,7 +25,7 @@ public:
void setOrder(int order);
Q_REQUIRED_RESULT int order() const;
virtual Q_REQUIRED_RESULT bool canProcessKeyEvent() const;
Q_REQUIRED_RESULT virtual bool canProcessKeyEvent() const;
private:
std::unique_ptr<PluginEditorPrivate> const d;
......
......@@ -28,17 +28,17 @@ public:
MessageComposer::ComposerViewInterface *composerViewInterface() const;
void setComposerViewInterface(MessageComposer::ComposerViewInterface *composerViewInterface);
static Q_REQUIRED_RESULT QString convertVariables(MessageComposer::ComposerViewInterface *composerView, const QString &text);
Q_REQUIRED_RESULT static QString convertVariables(MessageComposer::ComposerViewInterface *composerView, const QString &text);
Q_REQUIRED_RESULT bool canStart() const;
Q_SIGNALS:
void textConverted(const QString &str);
private:
static Q_REQUIRED_RESULT QString convertVariables(const QString &cmd, int &i, QChar c);
static Q_REQUIRED_RESULT QString getFirstNameFromEmail(const QString &address);
static Q_REQUIRED_RESULT QString getLastNameFromEmail(const QString &address);
static Q_REQUIRED_RESULT QString getNameFromEmail(const QString &address);
Q_REQUIRED_RESULT static QString convertVariables(const QString &cmd, int &i, QChar c);
Q_REQUIRED_RESULT static QString getFirstNameFromEmail(const QString &address);
Q_REQUIRED_RESULT static QString getLastNameFromEmail(const QString &address);
Q_REQUIRED_RESULT static QString getNameFromEmail(const QString &address);
QString mText;
MessageComposer::ComposerViewInterface *mComposerViewInterface = nullptr;
};
......
......@@ -128,7 +128,7 @@ public:
ThreadExpandPolicy threadExpandPolicy,
FillViewStrategy fillViewStrategy,
bool readOnly);
static Q_REQUIRED_RESULT bool compareName(Aggregation *agg1, Aggregation *agg2)
Q_REQUIRED_RESULT static bool compareName(Aggregation *agg1, Aggregation *agg2)
{
return agg1->name() < agg2->name();
}
......
......@@ -92,7 +92,7 @@ public:
Q_REQUIRED_RESULT QuickSearchLine::SearchOptions currentOptions() const;
void save(const KSharedConfig::Ptr &config, const QString &filtername, const QString &iconName, int numFilter = -1);
static Q_REQUIRED_RESULT Filter *load(const KSharedConfig::Ptr &config, int filternumber);
Q_REQUIRED_RESULT static Filter *load(const KSharedConfig::Ptr &config, int filternumber);
void generateRandomIdentifier();
Q_REQUIRED_RESULT QString identifier() const;
void setIdentifier(const QString &newIdentifier);
......@@ -102,7 +102,7 @@ public:
void setOptions(QuickSearchLine::SearchOptions newOptions);
static Q_REQUIRED_RESULT Filter *loadFromConfigGroup(const KConfigGroup &newGroup);
Q_REQUIRED_RESULT static Filter *loadFromConfigGroup(const KConfigGroup &newGroup);
Q_REQUIRED_RESULT const QString &iconName() const;
void setIconName(const QString &newIconName);
......
......@@ -48,7 +48,7 @@ public:
Q_REQUIRED_RESULT QString id() const override;
Q_REQUIRED_RESULT bool containsOutboundMessages() const override;
virtual Q_REQUIRED_RESULT bool isOutBoundFolder(const Akonadi::Collection &c) const;
Q_REQUIRED_RESULT virtual bool isOutBoundFolder(const Akonadi::Collection &c) const;
Q_REQUIRED_RESULT int initialUnreadRowCountGuess() const override;
Q_REQUIRED_RESULT bool initializeMessageItem(MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const override;
......
......@@ -52,9 +52,9 @@ public:
Q_REQUIRED_RESULT QString directionOf(const QString &str) const;
static Q_REQUIRED_RESULT QString strToHtml(const QString &str, KTextToHTML::Options flags = KTextToHTML::PreserveSpaces);
static Q_REQUIRED_RESULT QString dateString(KMime::Message *message, HeaderStyleUtilDateFormat dateFormat);
static Q_REQUIRED_RESULT QString dateString(const QDateTime &date, HeaderStyleUtilDateFormat dateFormat);
Q_REQUIRED_RESULT static QString strToHtml(const QString &str, KTextToHTML::Options flags = KTextToHTML::PreserveSpaces);
Q_REQUIRED_RESULT static QString dateString(KMime::Message *message, HeaderStyleUtilDateFormat dateFormat);
Q_REQUIRED_RESULT static QString dateString(const QDateTime &date, HeaderStyleUtilDateFormat dateFormat);
Q_REQUIRED_RESULT QString subjectString(KMime::Message *message, KTextToHTML::Options flags = KTextToHTML::PreserveSpaces) const;
......@@ -62,13 +62,13 @@ public:
Q_REQUIRED_RESULT QString spamStatus(KMime::Message *message) const;
static Q_REQUIRED_RESULT QString dateStr(const QDateTime &dateTime);
Q_REQUIRED_RESULT static QString dateStr(const QDateTime &dateTime);
static Q_REQUIRED_RESULT QString dateShortStr(const QDateTime &dateTime);
Q_REQUIRED_RESULT static QString dateShortStr(const QDateTime &dateTime);
MESSAGEVIEWER_DEPRECATED static Q_REQUIRED_RESULT QSharedPointer<KMime::Headers::Generics::MailboxList> resentFromList(KMime::Message *message);
MESSAGEVIEWER_DEPRECATED Q_REQUIRED_RESULT static QSharedPointer<KMime::Headers::Generics::MailboxList> resentFromList(KMime::Message *message);
MESSAGEVIEWER_DEPRECATED static Q_REQUIRED_RESULT QSharedPointer<KMime::Headers::Generics::MailboxList> resentToList(KMime::Message *message);
MESSAGEVIEWER_DEPRECATED Q_REQUIRED_RESULT static QSharedPointer<KMime::Headers::Generics::MailboxList> resentToList(KMime::Message *message);
Q_REQUIRED_RESULT xfaceSettings xface(const HeaderStyle *style, KMime::Message *message) const;
......
......@@ -33,23 +33,23 @@ public:
virtual HeaderStyle *headerStyle() const = 0;
virtual HeaderStrategy *headerStrategy() const = 0;
virtual HeaderStyleInterface *createView(KActionMenu *menu, QActionGroup *actionGroup, KActionCollection *ac, QObject *parent = nullptr) = 0;
virtual Q_REQUIRED_RESULT QString name() const = 0;
virtual Q_REQUIRED_RESULT bool hasMargin() const;
virtual Q_REQUIRED_RESULT QString alignment() const;
virtual Q_REQUIRED_RESULT int elidedTextSize() const;
Q_REQUIRED_RESULT virtual QString name() const = 0;
Q_REQUIRED_RESULT virtual bool hasMargin() const;
Q_REQUIRED_RESULT virtual QString alignment() const;
Q_REQUIRED_RESULT virtual int elidedTextSize() const;
void setIsEnabled(bool enabled);
Q_REQUIRED_RESULT bool isEnabled() const;
virtual Q_REQUIRED_RESULT QString attachmentHtml() const;
Q_REQUIRED_RESULT virtual QString attachmentHtml() const;
virtual Q_REQUIRED_RESULT bool hasConfigureDialog() const;
Q_REQUIRED_RESULT virtual bool hasConfigureDialog() const;
virtual void showConfigureDialog(QWidget *parent);
virtual Q_REQUIRED_RESULT QString extraScreenCss(const QString &headerFont) const;
virtual Q_REQUIRED_RESULT QString extraPrintCss(const QString &headerFont) const;
virtual Q_REQUIRED_RESULT QString extraCommonCss(const QString &headerFont) const;
Q_REQUIRED_RESULT virtual QString extraScreenCss(const QString &headerFont) const;
Q_REQUIRED_RESULT virtual QString extraPrintCss(const QString &headerFont) const;
Q_REQUIRED_RESULT virtual QString extraCommonCss(const QString &headerFont) const;
private:
std::unique_ptr<HeaderStylePluginPrivate> const d;
......
......@@ -58,13 +58,13 @@ public:
* @return a string to be shown in the status bar while hovering
* over this link.
*/
virtual Q_REQUIRED_RESULT QString statusBarMessage(const QUrl &url, MessageViewer::ViewerPrivate *w) const = 0;
Q_REQUIRED_RESULT virtual 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 Q_REQUIRED_RESULT bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Q_REQUIRED_RESULT virtual bool handleShiftClick(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url)
Q_UNUSED(window)
......@@ -74,7 +74,7 @@ public:
/**
* @return should return true if this URLHandler will handle the drag
*/
virtual Q_REQUIRED_RESULT bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Q_REQUIRED_RESULT virtual bool willHandleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url)
Q_UNUSED(window)
......@@ -86,7 +86,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 Q_REQUIRED_RESULT bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
Q_REQUIRED_RESULT virtual bool handleDrag(const QUrl &url, MessageViewer::ViewerPrivate *window) const
{
Q_UNUSED(url)
Q_UNUSED(window)
......
......@@ -40,19 +40,19 @@ public:
virtual void renderSubParts(const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *htmlWriter) = 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;
Q_REQUIRED_RESULT virtual bool isHiddenHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
Q_REQUIRED_RESULT virtual MimeTreeParser::IconType displayHint(const MimeTreeParser::MessagePart::Ptr &msgPart) = 0;
Q_REQUIRED_RESULT virtual bool showEmoticons() const = 0;
Q_REQUIRED_RESULT virtual bool isPrinting() const = 0;
Q_REQUIRED_RESULT virtual bool htmlLoadExternal() const = 0;
Q_REQUIRED_RESULT virtual bool showExpandQuotesMark() const = 0;
Q_REQUIRED_RESULT virtual bool showOnlyOneMimePart() const = 0;
Q_REQUIRED_RESULT virtual bool showSignatureDetails() const = 0;
Q_REQUIRED_RESULT virtual bool showEncryptionDetails() const = 0;
Q_REQUIRED_RESULT virtual int levelQuote() const = 0;
protected:
virtual Q_REQUIRED_RESULT bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) = 0;
Q_REQUIRED_RESULT virtual bool renderWithFactory(const QMetaObject *mo, const MimeTreeParser::MessagePart::Ptr &msgPart, HtmlWriter *writer) = 0;
};
/**
* @brief The MessagePartRendererBase class
......@@ -62,6 +62,6 @@ class MESSAGEVIEWER_EXPORT MessagePartRendererBase
public:
MessagePartRendererBase();
virtual ~MessagePartRendererBase();
virtual Q_REQUIRED_RESULT bool render(const MimeTreeParser::MessagePart::Ptr &, HtmlWriter *htmlWriter, RenderContext *context) const = 0;
Q_REQUIRED_RESULT virtual bool render(const MimeTreeParser::MessagePart::Ptr &, HtmlWriter *htmlWriter, RenderContext *context) const = 0;
};
}
......@@ -30,12 +30,12 @@ public:
void setParentWidget(QWidget *parent);
Q_REQUIRED_RESULT QWidget *parentWidget() const;
virtual Q_REQUIRED_RESULT Akonadi::Item::List exec(const Akonadi::Item::List &list) = 0;
Q_REQUIRED_RESULT virtual Akonadi::Item::List exec(const Akonadi::Item::List &list) = 0;
void setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params);
Q_REQUIRED_RESULT MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters() const;
virtual Q_REQUIRED_RESULT QList<QAction *> actions() const;
Q_REQUIRED_RESULT virtual QList<QAction *> actions() const;
virtual void createActions(KActionCollection *ac);
......
......@@ -25,7 +25,7 @@ public:
virtual void loadSettings() = 0;
virtual void saveSettings() = 0;
virtual void resetSettings() = 0;
virtual Q_REQUIRED_RESULT QString helpAnchor() const;
Q_REQUIRED_RESULT virtual QString helpAnchor() const;
Q_SIGNALS:
void configureChanged();
};
......
......@@ -25,7 +25,7 @@ public:
virtual void loadSettings() = 0;
virtual void saveSettings() = 0;
virtual void resetSettings() = 0;
virtual Q_REQUIRED_RESULT QString helpAnchor() const;
Q_REQUIRED_RESULT virtual QString helpAnchor() const;
Q_SIGNALS:
void configureChanged();
};
......
......@@ -26,7 +26,7 @@ public:
explicit ScamCheckShortUrl(QObject *parent = nullptr);
~ScamCheckShortUrl() override;
static Q_REQUIRED_RESULT bool isShortUrl(const QUrl &url);
Q_REQUIRED_RESULT static bool isShortUrl(const QUrl &url);
void expandedUrl(const QUrl &url);
......
......@@ -71,11 +71,11 @@ public:
void setParentPart(MessagePart *parentPart);
MessagePart *parentPart() const;
virtual Q_REQUIRED_RESULT QString text() const;
Q_REQUIRED_RESULT virtual QString text() const;
void setText(const QString &text);
virtual Q_REQUIRED_RESULT QString plaintextContent() const;
virtual Q_REQUIRED_RESULT QString htmlContent() const;
Q_REQUIRED_RESULT virtual QString plaintextContent() const;
Q_REQUIRED_RESULT virtual QString htmlContent() const;
/** The KMime::Content* node that's represented by this part.
* Can be @c nullptr, e.g. for sub-parts of an inline signed body part.
......@@ -126,7 +126,7 @@ public:
Interface::ObjectTreeSource *source() const;
NodeHelper *nodeHelper() const;
virtual Q_REQUIRED_RESULT bool hasHeader(const char *headerType) const;
Q_REQUIRED_RESULT virtual bool hasHeader(const char *headerType) const;
virtual const KMime::Headers::Base *header(const char *headerType) const;
virtual QVector<KMime::Headers::Base *> headers(const char *headerType) const;
......
......@@ -193,7 +193,7 @@ public:
* Return a list of the supported encodings
* @param usAscii if true, US-Ascii encoding will be prepended to the list.
*/
static Q_REQUIRED_RESULT QStringList supportedEncodings(bool usAscii); // TODO(Andras) move to a utility class?
Q_REQUIRED_RESULT static QStringList supportedEncodings(bool usAscii); // TODO(Andras) move to a utility class?
Q_REQUIRED_RESULT QString fromAsString(KMime::Content *node) const;
......
......@@ -21,7 +21,7 @@ public:
explicit TemplateParserEmailAddressRequesterBase(QWidget *parent = nullptr);
~TemplateParserEmailAddressRequesterBase() override;
virtual Q_REQUIRED_RESULT QString text() const;
Q_REQUIRED_RESULT virtual QString text() const;
virtual void setText(const QString &str);
virtual void clear();
Q_SIGNALS:
......
......@@ -336,7 +336,7 @@ private:
* Does the necessary conversions like escaping characters, changing "\n" to
* breakline tag before appending text to htmlBody.
*/
static Q_REQUIRED_RESULT QString plainTextToHtml(const QString &body);
Q_REQUIRED_RESULT static QString plainTextToHtml(const QString &body);
/**
* Make a HTML content valid by adding missing html/head/body tag.
......
......@@ -36,7 +36,7 @@ public:
/**
* Returns the template configuration identifier string for a given identity.
*/
static Q_REQUIRED_RESULT QString configIdString(uint id);
Q_REQUIRED_RESULT static QString configIdString(uint id);
public Q_SLOTS:
void slotInsertCommand(const QString &cmd, int adjustCursor = 0);
......
......@@ -19,9 +19,9 @@ public:
explicit UrlHashing(const QUrl &url);
~UrlHashing();
static Q_REQUIRED_RESULT QString canonicalizeUrl(QUrl url);
static Q_REQUIRED_RESULT QStringList generatePathsToCheck(const QString &str, const QString &query);
static Q_REQUIRED_RESULT QStringList generateHostsToCheck(const QString &str);
Q_REQUIRED_RESULT static QString canonicalizeUrl(QUrl url);
Q_REQUIRED_RESULT static QStringList generatePathsToCheck(const QString &str, const QString &query);
Q_REQUIRED_RESULT static QStringList generateHostsToCheck(const QString &str);
/*long hash, short hash*/
Q_REQUIRED_RESULT QHash<QByteArray, QByteArray> hashList() const;
......
......@@ -24,8 +24,8 @@ Q_SIGNALS:
void urlBlocked(const QUrl &url);
protected:
virtual Q_REQUIRED_RESULT bool urlIsAuthorized(const QUrl &requestedUrl);
virtual Q_REQUIRED_RESULT bool urlIsBlocked(const QUrl &requestedUrl);
Q_REQUIRED_RESULT virtual bool urlIsAuthorized(const QUrl &requestedUrl);
Q_REQUIRED_RESULT virtual bool urlIsBlocked(const QUrl &requestedUrl);
private:
bool mAllowLoadExternalReference = false;
......
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