Commit 3ec0456a authored by Laurent Montel's avatar Laurent Montel 😁

Add missing Q_REQUIRED_RESULT

parent f41e6044
Pipeline #28942 passed with stage
in 12 minutes and 1 second
......@@ -23,7 +23,7 @@
#define NESTEDLISTHELPER_H
//@cond PRIVATE
#include <QObject>
class QTextEdit;
class QKeyEvent;
......@@ -109,7 +109,7 @@ public:
*
* @return Whether the item can be indented.
*/
bool canIndent() const;
Q_REQUIRED_RESULT bool canIndent() const;
/**
* \brief Check whether the current item in the list may be dedented.
......@@ -120,7 +120,7 @@ public:
*
* @return Whether the item can be dedented.
*/
bool canDedent() const;
Q_REQUIRED_RESULT bool canDedent() const;
private:
QTextCursor topOfSelection();
......
......@@ -109,7 +109,7 @@ public:
*
* @return a modified HTML code, where the \<img\> tags got replaced
*/
static QByteArray imageNamesToContentIds(const QByteArray &htmlBody, const ImageList &imageList);
static Q_REQUIRED_RESULT QByteArray imageNamesToContentIds(const QByteArray &htmlBody, const ImageList &imageList);
Q_REQUIRED_RESULT QSharedPointer<EmbeddedImage> createEmbeddedImage(const QImage &img, const QString &imageName) const;
private:
......
......@@ -41,7 +41,7 @@ public:
QString extEditorPath;
KProcess *externalEditorProcess = nullptr;
QTemporaryFile *extEditorTempFile = nullptr;
RichTextComposer *richTextComposer = nullptr;
RichTextComposer *const richTextComposer = nullptr;
bool useExtEditor = false;
};
......
......@@ -34,7 +34,7 @@ class KPIMTEXTEDIT_TESTS_EXPORT InsertHtmlDialog : public QDialog
public:
explicit InsertHtmlDialog(QWidget *parent = nullptr);
~InsertHtmlDialog();
QString html() const;
Q_REQUIRED_RESULT QString html() const;
void setSelectedText(const QString &str);
private:
......
......@@ -34,16 +34,16 @@ public:
explicit InsertImageDialog(QWidget *parent = nullptr);
~InsertImageDialog();
int imageWidth() const;
int imageHeight() const;
Q_REQUIRED_RESULT int imageWidth() const;
Q_REQUIRED_RESULT int imageHeight() const;
void setImageWidth(int value);
void setImageHeight(int value);
QUrl imageUrl() const;
Q_REQUIRED_RESULT QUrl imageUrl() const;
void setImageUrl(const QUrl &url);
bool keepOriginalSize() const;
Q_REQUIRED_RESULT bool keepOriginalSize() const;
private:
friend class InsertImageDialogPrivate;
......
......@@ -35,15 +35,15 @@ public:
~InsertImageWidget();
void setImageWidth(int value);
int imageWidth() const;
Q_REQUIRED_RESULT int imageWidth() const;
void setImageHeight(int value);
int imageHeight() const;
Q_REQUIRED_RESULT int imageHeight() const;
QUrl imageUrl() const;
Q_REQUIRED_RESULT QUrl imageUrl() const;
void setImageUrl(const QUrl &url);
bool keepOriginalSize() const;
Q_REQUIRED_RESULT bool keepOriginalSize() const;
Q_SIGNALS:
void enableButtonOk(bool enabled);
......
......@@ -32,17 +32,17 @@ class InsertTableDialog : public QDialog
public:
explicit InsertTableDialog(QWidget *parent);
~InsertTableDialog();
int columns() const;
int rows() const;
int border() const;
Q_REQUIRED_RESULT int columns() const;
Q_REQUIRED_RESULT int rows() const;
Q_REQUIRED_RESULT int border() const;
void setColumns(int col);
void setRows(int rows);
void setBorder(int border);
QTextLength::Type typeOfLength() const;
Q_REQUIRED_RESULT QTextLength::Type typeOfLength() const;
void setTypeOfLength(QTextLength::Type type);
int length() const;
Q_REQUIRED_RESULT int length() const;
void setLength(int);
private:
......
......@@ -35,12 +35,12 @@ class KPIMTEXTEDIT_EXPORT AbstractTextToSpeechConfigInterface : public QObject
public:
explicit AbstractTextToSpeechConfigInterface(QObject *parent = nullptr);
~AbstractTextToSpeechConfigInterface();
virtual QVector<QLocale> availableLocales() const;
virtual QLocale locale() const;
virtual Q_REQUIRED_RESULT QVector<QLocale> availableLocales() const;
virtual Q_REQUIRED_RESULT QLocale locale() const;
virtual void setLocale(const QLocale &locale);
virtual QStringList availableEngines() const;
virtual QStringList availableVoices() const;
virtual Q_REQUIRED_RESULT QStringList availableEngines() const;
virtual Q_REQUIRED_RESULT QStringList availableVoices() const;
virtual void setEngine(const QString &engineName);
};
}
......
......@@ -33,9 +33,9 @@ public:
explicit AbstractTextToSpeechInterface(QObject *parent = nullptr);
~AbstractTextToSpeechInterface();
virtual bool isReady() const;
virtual Q_REQUIRED_RESULT bool isReady() const;
virtual void say(const QString &text);
virtual int volume() const;
virtual Q_REQUIRED_RESULT int volume() const;
virtual void setVolume(int value);
virtual void reloadSettings();
};
......
......@@ -38,7 +38,7 @@ public:
~TextToSpeech();
bool isReady() const;
Q_REQUIRED_RESULT bool isReady() const;
enum State {
Ready = 0,
......@@ -47,12 +47,12 @@ public:
BackendError
};
double volume() const;
QVector<QLocale> availableLocales() const;
QStringList availableEngines() const;
QStringList availableVoices() const;
Q_REQUIRED_RESULT double volume() const;
Q_REQUIRED_RESULT QVector<QLocale> availableLocales() const;
Q_REQUIRED_RESULT QStringList availableEngines() const;
Q_REQUIRED_RESULT QStringList availableVoices() const;
QLocale locale() const;
Q_REQUIRED_RESULT QLocale locale() const;
void reloadSettings();
public Q_SLOTS:
......
......@@ -41,7 +41,7 @@ public:
QAction *playPauseAction() const;
TextToSpeechWidget::State state() const;
Q_REQUIRED_RESULT TextToSpeechWidget::State state() const;
public Q_SLOTS:
void setState(TextToSpeechWidget::State);
......
......@@ -35,11 +35,11 @@ public:
explicit TextToSpeechConfigInterface(QObject *parent = nullptr);
~TextToSpeechConfigInterface() override;
QVector<QLocale> availableLocales() const override;
QLocale locale() const override;
Q_REQUIRED_RESULT QVector<QLocale> availableLocales() const override;
Q_REQUIRED_RESULT QLocale locale() const override;
QStringList availableEngines() const override;
QStringList availableVoices() const override;
Q_REQUIRED_RESULT QStringList availableEngines() const override;
Q_REQUIRED_RESULT QStringList availableVoices() const override;
void setEngine(const QString &engineName) override;
QTextToSpeech *mTextToSpeech = nullptr;
};
......
......@@ -38,7 +38,7 @@ public:
explicit TextToSpeechInterface(TextToSpeechWidget *textToSpeechWidget, QObject *parent = nullptr);
~TextToSpeechInterface() override;
bool isReady() const override;
Q_REQUIRED_RESULT bool isReady() const override;
void say(const QString &text) override;
Q_REQUIRED_RESULT int volume() const override;
void setVolume(int value) override;
......
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