Commit 10e18e3f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent 1f369589
Pipeline #21295 passed with stage
in 6 minutes and 11 seconds
......@@ -73,13 +73,13 @@ public:
* Returns the link text entered by the user.
* @return The link text
*/
QString linkText() const;
Q_REQUIRED_RESULT QString linkText() const;
/**
* Returns the target link url entered by the user.
* @return The link url
*/
QString linkUrl() const;
Q_REQUIRED_RESULT QString linkUrl() const;
private:
void slotTextChanged(const QString &);
......
......@@ -103,7 +103,7 @@ public:
const QString defaultQuoteSign() const;
void createActions(KActionCollection *ac);
QVector<QAction *> richTextActionList() const;
Q_REQUIRED_RESULT QVector<QAction *> richTextActionList() const;
void setEnableActions(bool state);
KPIMTextEdit::RichTextComposerControler *composerControler() const;
......
......@@ -57,7 +57,7 @@ public:
RichTextComposerImages *composerImages() const;
Q_REQUIRED_RESULT bool painterActive() const;
void disablePainter();
bool isFormattingUsed() const;
Q_REQUIRED_RESULT bool isFormattingUsed() const;
void setFontForWholeText(const QFont &font);
void textModeChanged(KPIMTextEdit::RichTextComposer::Mode mode);
......
......@@ -37,7 +37,7 @@ public:
~RichTextComposerEmailQuoteDecorator() override;
protected:
bool isSpellCheckingEnabledForBlock(const QString &blockText) const override;
Q_REQUIRED_RESULT bool isSpellCheckingEnabledForBlock(const QString &blockText) const override;
private:
class RichTextComposerEmailQuoteDecoratorPrivate;
RichTextComposerEmailQuoteDecoratorPrivate *const d;
......
......@@ -28,7 +28,7 @@ class KPIMTEXTEDIT_TESTS_EXPORT EmoticonTextEditItem : public QListWidgetItem
{
public:
explicit EmoticonTextEditItem(const QString &emoticonText, QListWidget *parent);
QString text() const;
Q_REQUIRED_RESULT QString text() const;
private:
QString mText;
......
......@@ -266,7 +266,7 @@ public:
@return The fully marked up text.
*/
virtual QString getResult() = 0;
virtual Q_REQUIRED_RESULT QString getResult() = 0;
virtual void addSingleBreakLine() = 0;
};
......
......@@ -109,7 +109,7 @@ public:
Directs the builder to create output for the single @p frame. If calling
this method directly, an invalid QTextFrame::iterator may be used.
*/
virtual QTextFrame::iterator processFrame(QTextFrame::iterator it,
virtual Q_REQUIRED_RESULT QTextFrame::iterator processFrame(QTextFrame::iterator it,
QTextFrame *frame);
/**
......@@ -119,7 +119,7 @@ public:
This method does not process the contents of the @p block, but uses the
@ref processBlockContents method to do so.
*/
virtual QTextFrame::iterator processBlock(QTextFrame::iterator it,
virtual Q_REQUIRED_RESULT QTextFrame::iterator processBlock(QTextFrame::iterator it,
const QTextBlock &block);
/**
......@@ -128,7 +128,7 @@ public:
The block @p block is the container of the @p textObject.
*/
virtual QTextFrame::iterator processObject(QTextFrame::iterator it,
virtual Q_REQUIRED_RESULT QTextFrame::iterator processObject(QTextFrame::iterator it,
const QTextBlock &block,
QTextObject *textObject);
......@@ -138,7 +138,7 @@ public:
The block @p block is the first block in the @p textBlockGroup.
*/
virtual QPair<QTextFrame::iterator, QTextBlock>
virtual Q_REQUIRED_RESULT QPair<QTextFrame::iterator, QTextBlock>
processBlockGroup(const QTextFrame::iterator &it, const QTextBlock &block,
QTextBlockGroup *textBlockGroup);
......@@ -148,7 +148,7 @@ public:
The block @p block is the first block in the @p textList.
*/
virtual QPair<QTextFrame::iterator, QTextBlock>
virtual Q_REQUIRED_RESULT QPair<QTextFrame::iterator, QTextBlock>
processList(QTextFrame::iterator it, const QTextBlock &block,
QTextList *textList);
......@@ -157,7 +157,7 @@ public:
block. If calling this method directly, an invalid QTextFrame::iterator
may be used.
*/
virtual QTextFrame::iterator processBlockContents(QTextFrame::iterator it,
virtual Q_REQUIRED_RESULT QTextFrame::iterator processBlockContents(QTextFrame::iterator it,
const QTextBlock &block);
/**
......@@ -172,7 +172,7 @@ public:
fragment. If calling this method directly, an invalid QTextBlock::iterator
may be used. @p doc is the document the fragment is in.
*/
virtual QTextBlock::iterator processFragment(QTextBlock::iterator it,
virtual Q_REQUIRED_RESULT QTextBlock::iterator processFragment(QTextBlock::iterator it,
const QTextFragment &fragment,
QTextDocument const *doc);
......@@ -184,7 +184,7 @@ public:
If calling this method directly, an invalid QTextBlock::iterator may be
used.
*/
virtual QTextBlock::iterator
virtual Q_REQUIRED_RESULT QTextBlock::iterator
processCharTextObject(QTextBlock::iterator it, const QTextFragment &fragment,
QTextObject *textObject);
......@@ -195,7 +195,7 @@ public:
If calling this method directly, an invalid QTextBlock::iterator may be
used. @p doc is the document the fragment is in.
*/
virtual QTextBlock::iterator processImage(QTextBlock::iterator it,
virtual Q_REQUIRED_RESULT QTextBlock::iterator processImage(QTextBlock::iterator it,
const QTextImageFormat &imageFormat,
QTextDocument const *doc);
......@@ -206,7 +206,7 @@ public:
If calling this method directly, an invalid QTextFrame::iterator may be
used.
*/
virtual QTextFrame::iterator processTable(QTextFrame::iterator it,
virtual Q_REQUIRED_RESULT QTextFrame::iterator processTable(QTextFrame::iterator it,
QTextTable *table);
/**
......@@ -230,7 +230,7 @@ protected:
The return pair is the iterator pointing after the end of @p blockGroup
and the first block after @p blockGroup.
*/
QPair<QTextFrame::iterator, QTextBlock>
Q_REQUIRED_RESULT QPair<QTextFrame::iterator, QTextBlock>
skipBlockGroup(QTextFrame::iterator it, const QTextBlock &_block,
QTextBlockGroup *blockGroup);
......@@ -241,7 +241,7 @@ protected:
@p openingTags should be a set of tags opened at the fragment pointed to
by @p it.
*/
QList<int> sortOpeningOrder(QSet<int> openingTags,
Q_REQUIRED_RESULT QList<int> sortOpeningOrder(QSet<int> openingTags,
QTextBlock::iterator it) const;
/**
......@@ -258,12 +258,12 @@ protected:
/**
Returns the tags that should be closed at the position of @p it.
*/
virtual QSet<int> getElementsToClose(const QTextBlock::iterator &it) const;
virtual Q_REQUIRED_RESULT QSet<int> getElementsToClose(const QTextBlock::iterator &it) const;
/**
Returns the tags that should be opened at the position of @p it.
*/
virtual QList<int> getElementsToOpen(const QTextBlock::iterator &it);
virtual Q_REQUIRED_RESULT QList<int> getElementsToOpen(const QTextBlock::iterator &it);
/**
Flags for the tags that may be open.
......
......@@ -102,14 +102,14 @@ public:
Adds a reference to @p reference to the internal list of references in the
document.
*/
int addReference(const QString &reference);
Q_REQUIRED_RESULT int addReference(const QString &reference);
/**
Returns the finalised plain text markup, including references at the end.
*/
QString getResult() override;
Q_REQUIRED_RESULT QString getResult() override;
bool isQuoteBlock(qreal top, qreal bottom, qreal left, qreal right) const;
Q_REQUIRED_RESULT bool isQuoteBlock(qreal top, qreal bottom, qreal left, qreal right) const;
void beginForeground(const QBrush &brush) override;
void endForeground() override;
......
......@@ -53,16 +53,16 @@ Q_SIGNALS:
void hideFindBar();
protected:
virtual bool viewIsReadOnly() const = 0;
virtual bool documentIsEmpty() const = 0;
virtual bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) = 0;
virtual bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) = 0;
virtual Q_REQUIRED_RESULT bool viewIsReadOnly() const = 0;
virtual Q_REQUIRED_RESULT bool documentIsEmpty() const = 0;
virtual Q_REQUIRED_RESULT bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) = 0;
virtual Q_REQUIRED_RESULT bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) = 0;
virtual void autoSearchMoveCursor() = 0;
bool event(QEvent *e) override;
void clearSelections();
void updateHighLight(bool);
bool searchText(bool backward, bool isAutoSearch);
Q_REQUIRED_RESULT bool searchText(bool backward, bool isAutoSearch);
void updateSensitivity(bool);
void setFoundMatch(bool match);
......
......@@ -40,7 +40,7 @@ public:
void setFoundMatch(bool match);
bool isRegularExpression() const;
Q_REQUIRED_RESULT bool isRegularExpression() const;
Q_REQUIRED_RESULT QRegularExpression searchRegExp() const;
Q_REQUIRED_RESULT QString searchText() const;
......
......@@ -40,10 +40,10 @@ public:
~PlainTextEditFindBar() override;
protected:
bool viewIsReadOnly() const override;
bool documentIsEmpty() const override;
bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) override;
bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) override;
Q_REQUIRED_RESULT bool viewIsReadOnly() const override;
Q_REQUIRED_RESULT bool documentIsEmpty() const override;
Q_REQUIRED_RESULT bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) override;
Q_REQUIRED_RESULT bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) override;
void autoSearchMoveCursor() override;
public Q_SLOTS:
......
......@@ -99,10 +99,10 @@ protected:
protected:
void contextMenuEvent(QContextMenuEvent *event) override;
bool event(QEvent *ev) override;
Q_REQUIRED_RESULT bool event(QEvent *ev) override;
void keyPressEvent(QKeyEvent *event) override;
bool overrideShortcut(QKeyEvent *event);
bool handleShortcut(QKeyEvent *event);
Q_REQUIRED_RESULT bool overrideShortcut(QKeyEvent *event);
Q_REQUIRED_RESULT bool handleShortcut(QKeyEvent *event);
void wheelEvent(QWheelEvent *event) override;
virtual Sonnet::SpellCheckDecorator *createSpellCheckDecorator();
......
......@@ -39,10 +39,10 @@ public:
~RichTextEditFindBar() override;
protected:
bool viewIsReadOnly() const override;
bool documentIsEmpty() const override;
bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) override;
bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) override;
Q_REQUIRED_RESULT bool viewIsReadOnly() const override;
Q_REQUIRED_RESULT bool documentIsEmpty() const override;
Q_REQUIRED_RESULT bool searchInDocument(const QString &text, QTextDocument::FindFlags searchOptions) override;
Q_REQUIRED_RESULT bool searchInDocument(const QRegularExpression &regExp, QTextDocument::FindFlags searchOptions) override;
void autoSearchMoveCursor() override;
public Q_SLOTS:
......
......@@ -64,7 +64,7 @@ public:
void setSpellCheckingConfigFileName(const QString &_fileName);
bool checkSpellingEnabled() const;
Q_REQUIRED_RESULT bool checkSpellingEnabled() const;
void setCheckSpellingEnabled(bool check);
void setSpellCheckingLanguage(const QString &_language);
......
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