Commit 70dd48ab authored by Laurent Montel's avatar Laurent Montel 😁

Add missing Q_REQUIRED_RESULT

parent f5730a3e
Pipeline #38142 canceled with stage
......@@ -17,7 +17,7 @@ public:
explicit SievePurposeMenuWidget(QWidget *parentWidget, QObject *parent = nullptr);
~SievePurposeMenuWidget() override;
QByteArray text() override;
Q_REQUIRED_RESULT QByteArray text() override;
void setEditorWidget(SieveEditorWidget *editor);
private:
SieveEditorWidget *mSieveEditorWidget = nullptr;
......
......@@ -41,9 +41,9 @@ public:
void error(const KSieve::Error &error) override;
void finished() override;
QString result() const;
QString error() const;
bool hasError() const;
Q_REQUIRED_RESULT QString result() const;
Q_REQUIRED_RESULT QString error() const;
Q_REQUIRED_RESULT bool hasError() const;
void clear();
......
......@@ -29,22 +29,22 @@ public:
NotConfigured ///< The agent is lacking required configuration
};
QString name() const;
Q_REQUIRED_RESULT QString name() const;
void setName(const QString &name);
QString identifier() const;
Q_REQUIRED_RESULT QString identifier() const;
void setIdentifier(const QString &identifier);
Status status() const;
Q_REQUIRED_RESULT Status status() const;
void setStatus(Status status);
QStringList mimeTypes() const;
Q_REQUIRED_RESULT QStringList mimeTypes() const;
void setMimeTypes(const QStringList &mimeTypes);
QStringList capabilities() const;
Q_REQUIRED_RESULT QStringList capabilities() const;
void setCapabilities(const QStringList &capabilities);
bool operator==(const SieveImapInstance &other) const;
Q_REQUIRED_RESULT bool operator==(const SieveImapInstance &other) const;
private:
QStringList mMimeTypes;
QStringList mCapabilities;
......
......@@ -25,7 +25,7 @@ public:
static SieveImapInstanceInterfaceManager *self();
void setSieveImapInstanceInterface(SieveImapInstanceInterface *interface);
SieveImapInstanceInterface *sieveImapInstanceInterface() const;
QVector<KSieveUi::SieveImapInstance> sieveImapInstanceList() const;
Q_REQUIRED_RESULT QVector<KSieveUi::SieveImapInstance> sieveImapInstanceList() const;
private:
SieveImapInstanceInterface *mInterface = nullptr;
};
......
......@@ -21,7 +21,7 @@ public:
~SieveScriptDebuggerDialog();
void setScript(const QString &script);
QString script() const;
Q_REQUIRED_RESULT QString script() const;
private:
void slotScriptTextChanged();
......
......@@ -21,7 +21,7 @@ public:
explicit SieveTemplateListWidget(const QString &configName, QWidget *parent = nullptr);
~SieveTemplateListWidget() override;
QVector<PimCommon::defaultTemplate> defaultTemplates() override;
Q_REQUIRED_RESULT QVector<PimCommon::defaultTemplate> defaultTemplates() override;
Q_REQUIRED_RESULT bool addNewTemplate(QString &templateName, QString &templateScript) override;
Q_REQUIRED_RESULT bool modifyTemplate(QString &templateName, QString &templateScript, bool defaultTemplate) override;
void setSieveCapabilities(const QStringList &capabilities);
......
......@@ -20,27 +20,22 @@ enum MailAction {
CopyTo,
};
QString defaultMessageText();
QString defaultSubject();
MailAction defaultMailAction();
int defaultNotificationInterval();
KMime::Types::AddrSpecList defaultMailAliases();
bool defaultSendForSpam();
QString defaultDomainName();
QDate defaultStartDate();
QDate defaultEndDate();
Q_REQUIRED_RESULT QString defaultMessageText();
Q_REQUIRED_RESULT QString defaultSubject();
Q_REQUIRED_RESULT MailAction defaultMailAction();
Q_REQUIRED_RESULT int defaultNotificationInterval();
Q_REQUIRED_RESULT KMime::Types::AddrSpecList defaultMailAliases();
Q_REQUIRED_RESULT bool defaultSendForSpam();
Q_REQUIRED_RESULT QString defaultDomainName();
Q_REQUIRED_RESULT QDate defaultStartDate();
Q_REQUIRED_RESULT QDate defaultEndDate();
struct Vacation {
Vacation()
: notificationInterval(1)
, mailAction(Keep)
, valid(false)
, active(false)
, sendForSpam(true)
{
}
bool isValid() const
Q_REQUIRED_RESULT bool isValid() const
{
return valid;
}
......@@ -54,11 +49,11 @@ struct Vacation {
QTime startTime;
QDate endDate;
QTime endTime;
int notificationInterval;
MailAction mailAction;
bool valid;
bool active;
bool sendForSpam;
int notificationInterval = 1;
MailAction mailAction = Keep;
bool valid = false;
bool active = false;
bool sendForSpam = true;
};
Q_REQUIRED_RESULT QString composeScript(const Vacation &vacation);
......
......@@ -23,9 +23,9 @@ public:
virtual void setText(const QString &str) = 0;
virtual QString text() const = 0;
bool multiSelection() const;
Q_REQUIRED_RESULT bool multiSelection() const;
void setMultiSelection(bool multiSelection);
virtual bool isValid() const = 0;
virtual Q_REQUIRED_RESULT bool isValid() const = 0;
Q_SIGNALS:
void valueChanged();
......
......@@ -19,7 +19,7 @@ public:
~CustomManageSieveWidget() override;
protected:
bool refreshList() override;
Q_REQUIRED_RESULT bool refreshList() override;
private:
SieveImapPasswordProvider *const mPasswordProvider;
......
......@@ -18,7 +18,7 @@ public:
explicit LineEditValidator(QWidget *parent = nullptr);
~LineEditValidator();
bool setRegularExpressionPattern(const QString &pattern);
Q_REQUIRED_RESULT bool setRegularExpressionPattern(const QString &pattern);
private:
void initialize();
......
......@@ -21,7 +21,7 @@ public:
~MoveImapFolderWidget() override;
void setText(const QString &str) override;
QString text() const override;
Q_REQUIRED_RESULT QString text() const override;
void setSieveImapAccountSettings(const KSieveUi::SieveImapAccountSettings &account) override;
private:
......
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