Commit f99c0265 authored by Laurent Montel's avatar Laurent Montel
Browse files

Add missing Q_REQUIRED_RESULT

parent b601f202
Pipeline #226744 canceled with stage
in 2 minutes and 3 seconds
......@@ -8,6 +8,8 @@
#include "grammarerror.h"
#include "liblanguagetool_private_export.h"
#include <QStringList>
class LIBLANGUAGETOOLPRIVATE_TESTS_EXPORT LanguageToolGrammarError : public GrammarError
{
public:
......@@ -17,7 +19,7 @@ public:
void setTesting(bool b);
private:
static QStringList parseSuggestion(const QJsonObject &obj);
Q_REQUIRED_RESULT static QStringList parseSuggestion(const QJsonObject &obj);
bool mTesting = false;
};
Q_DECLARE_METATYPE(LanguageToolGrammarError)
......
......@@ -14,5 +14,5 @@ class LIBLANGUAGETOOLPRIVATE_TESTS_EXPORT LanguageToolListOfLanguagesParser
public:
LanguageToolListOfLanguagesParser();
~LanguageToolListOfLanguagesParser();
QVector<LanguageInfo> parseResult(const QJsonArray &obj) const;
Q_REQUIRED_RESULT QVector<LanguageInfo> parseResult(const QJsonArray &obj) const;
};
......@@ -37,7 +37,7 @@ public:
Q_REQUIRED_RESULT QString languageToolLanguagesPath() const;
static QString convertToLanguagePath(const QString &path);
Q_REQUIRED_RESULT static QString convertToLanguagePath(const QString &path);
Q_REQUIRED_RESULT QColor grammarColorForError(const QString &error);
......
......@@ -15,5 +15,5 @@ class LIBLANGUAGETOOLPRIVATE_TESTS_EXPORT LanguageToolParser
public:
LanguageToolParser();
~LanguageToolParser();
QVector<GrammarError> parseResult(const QJsonObject &obj) const;
Q_REQUIRED_RESULT QVector<GrammarError> parseResult(const QJsonObject &obj) const;
};
......@@ -48,7 +48,7 @@ private:
LanguageNotDefined,
};
LanguageToolResultJob::JobError canStartError() const;
Q_REQUIRED_RESULT LanguageToolResultJob::JobError canStartError() const;
void slotCheckGrammarFinished();
void addRequestAttribute(QNetworkRequest &request) const;
void slotFinish(QNetworkReply *reply);
......
......@@ -20,8 +20,8 @@
LanguageToolResultWidget::LanguageToolResultWidget(QWidget *parent)
: GrammarResultWidget(parent)
, mLanguageToolUpdateCombobox(new LanguageToolUpdateComboBox(this))
{
mLanguageToolUpdateCombobox = new LanguageToolUpdateComboBox(this);
addExtraWidget();
mLanguageToolUpdateCombobox->setLanguageToolCombobox(mLanguageToolComboBox);
mLanguageToolUpdateCombobox->setParentWidget(this);
......
......@@ -30,5 +30,5 @@ private:
void slotCheckGrammarFinished(const QString &result);
void slotError(const QString &str);
LanguageToolComboBox *mLanguageToolComboBox = nullptr;
LanguageToolUpdateComboBox *mLanguageToolUpdateCombobox = nullptr;
LanguageToolUpdateComboBox *const mLanguageToolUpdateCombobox;
};
......@@ -17,13 +17,13 @@ public:
explicit LanguageToolUpdateComboBox(QObject *parent = nullptr);
~LanguageToolUpdateComboBox() override;
LanguageToolComboBox *languageToolCombobox() const;
Q_REQUIRED_RESULT LanguageToolComboBox *languageToolCombobox() const;
void setLanguageToolCombobox(LanguageToolComboBox *languageToolCombobox);
void checkListOfLanguagesFromSpecificPath(const QString &url);
void refreshListOfLanguages();
QWidget *parentWidget() const;
Q_REQUIRED_RESULT QWidget *parentWidget() const;
void setParentWidget(QWidget *parentWidget);
private:
......
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