Commit de5ff5d3 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent 697e327c
......@@ -32,8 +32,8 @@ public:
~AbstractImapSettingsCheckJob();
virtual void start() = 0;
virtual bool settingsCanBeImported() const = 0;
virtual QString name() const = 0;
virtual Q_REQUIRED_RESULT bool settingsCanBeImported() const = 0;
virtual Q_REQUIRED_RESULT QString name() const = 0;
void setImapSettingsPassword(AbstractImapSettingsPassword *passwordImporter);
......
......@@ -31,8 +31,8 @@ public:
void start() override;
bool settingsCanBeImported() const override;
QString name() const override;
Q_REQUIRED_RESULT bool settingsCanBeImported() const override;
Q_REQUIRED_RESULT QString name() const override;
private:
inline bool resourceCanHaveSieveSupport(const QString &filename) const;
......
......@@ -30,12 +30,12 @@ public:
~ImportImapSettingsThunderbirdCheckJob() override;
void start() override;
bool settingsCanBeImported() const override;
QString name() const override;
Q_REQUIRED_RESULT bool settingsCanBeImported() const override;
Q_REQUIRED_RESULT QString name() const override;
private:
bool importSettings(const QString &directory, const QString &defaultProfile);
QMap<QString, QString> listProfile(QString &currentProfile, const QString &defaultSettingPath);
QString defaultPath() const;
Q_REQUIRED_RESULT bool importSettings(const QString &directory, const QString &defaultProfile);
Q_REQUIRED_RESULT QMap<QString, QString> listProfile(QString &currentProfile, const QString &defaultSettingPath);
Q_REQUIRED_RESULT QString defaultPath() const;
void insertIntoMap(const QString &line);
void addAuth(SieveEditorUtil::SieveServerConfig &config, const QString &accountName);
void encryption(SieveEditorUtil::SieveServerConfig &config, const QString &accountName);
......
......@@ -32,7 +32,7 @@ public:
~ImportImapSettingSearchPage();
void setProgramList(const QStringList &lst);
QStringList selectedPrograms() const;
Q_REQUIRED_RESULT QStringList selectedPrograms() const;
Q_SIGNALS:
void needToImportSettings(bool);
......
......@@ -29,7 +29,7 @@ public:
explicit ServerSieveListWidgetItem(QListWidget *parent = nullptr);
~ServerSieveListWidgetItem();
SieveEditorUtil::SieveServerConfig serverConfig() const;
Q_REQUIRED_RESULT SieveEditorUtil::SieveServerConfig serverConfig() const;
void setServerConfig(const SieveEditorUtil::SieveServerConfig &conf);
private:
......
......@@ -39,35 +39,35 @@ public:
explicit ServerSieveSettings(QWidget *parent = nullptr);
~ServerSieveSettings();
QString serverName() const;
Q_REQUIRED_RESULT QString serverName() const;
void setServerName(const QString &name);
int port() const;
Q_REQUIRED_RESULT int port() const;
void setPort(int value);
QString userName() const;
Q_REQUIRED_RESULT QString userName() const;
void setUserName(const QString &name);
QString password() const;
Q_REQUIRED_RESULT QString password() const;
void setPassword(const QString &pass);
void setServerSieveConfig(const SieveEditorUtil::SieveServerConfig &conf);
SieveEditorUtil::SieveServerConfig serverSieveConfig() const;
Q_REQUIRED_RESULT SieveEditorUtil::SieveServerConfig serverSieveConfig() const;
QString imapServerName() const;
Q_REQUIRED_RESULT QString imapServerName() const;
void setImapServerName(const QString &name);
int imapPort() const;
Q_REQUIRED_RESULT int imapPort() const;
void setImapPort(int value);
QString imapUserName() const;
Q_REQUIRED_RESULT QString imapUserName() const;
void setImapUserName(const QString &name);
QString imapPassword() const;
Q_REQUIRED_RESULT QString imapPassword() const;
void setImapPassword(const QString &pass);
void setAuthenticationType(KSieveUi::SieveImapAccountSettings::AuthenticationMode type);
KSieveUi::SieveImapAccountSettings::AuthenticationMode authenticationType() const;
Q_REQUIRED_RESULT KSieveUi::SieveImapAccountSettings::AuthenticationMode authenticationType() const;
Q_SIGNALS:
void enableOkButton(bool enabled);
......
......@@ -31,20 +31,20 @@ public:
explicit ServerSieveSettingsDialog(QWidget *parent = nullptr);
~ServerSieveSettingsDialog();
QString serverName() const;
Q_REQUIRED_RESULT QString serverName() const;
void setServerName(const QString &name);
int port() const;
Q_REQUIRED_RESULT int port() const;
void setPort(int value);
QString userName() const;
Q_REQUIRED_RESULT QString userName() const;
void setUserName(const QString &name);
QString password() const;
Q_REQUIRED_RESULT QString password() const;
void setPassword(const QString &pass);
void setServerSieveConfig(const SieveEditorUtil::SieveServerConfig &conf);
SieveEditorUtil::SieveServerConfig serverSieveConfig() const;
Q_REQUIRED_RESULT SieveEditorUtil::SieveServerConfig serverSieveConfig() const;
private:
void slotEnableButtonOk(bool);
......
......@@ -37,8 +37,8 @@ public:
void openBookmark(const KBookmark &bm, Qt::MouseButtons mb, Qt::KeyboardModifiers km) override;
QString currentTitle() const override;
QUrl currentUrl() const override;
Q_REQUIRED_RESULT QString currentTitle() const override;
Q_REQUIRED_RESULT QUrl currentUrl() const override;
Q_SIGNALS:
void openUrl(const QUrl &url);
......
......@@ -51,17 +51,17 @@ public:
QTabWidget *tabWidget() const;
KSieveUi::SieveEditorWidget::EditorMode pageMode() const;
bool isUndoAvailable() const;
bool isRedoAvailable() const;
bool isWordWrap() const;
Q_REQUIRED_RESULT bool isUndoAvailable() const;
Q_REQUIRED_RESULT bool isRedoAvailable() const;
Q_REQUIRED_RESULT bool isWordWrap() const;
bool hasSelection() const;
QString currentHelpTitle() const;
QUrl currentHelpUrl() const;
Q_REQUIRED_RESULT bool hasSelection() const;
Q_REQUIRED_RESULT QString currentHelpTitle() const;
Q_REQUIRED_RESULT QUrl currentHelpUrl() const;
void openBookmarkUrl(const QUrl &url);
bool printSupportEnabled() const;
bool isTextEditor() const;
QString currentText() const;
Q_REQUIRED_RESULT bool printSupportEnabled() const;
Q_REQUIRED_RESULT bool isTextEditor() const;
Q_REQUIRED_RESULT QString currentText() const;
void forceCloseTab(int index);
public Q_SLOTS:
void slotDebugSieveScript();
......
......@@ -38,8 +38,8 @@ public:
explicit SieveEditorMainWindow(QWidget *parent = nullptr);
~SieveEditorMainWindow() override;
QString currentHelpTitle() const;
QUrl currentHelpUrl() const;
Q_REQUIRED_RESULT QString currentHelpTitle() const;
Q_REQUIRED_RESULT QUrl currentHelpUrl() const;
protected:
void closeEvent(QCloseEvent *e) override;
......
......@@ -30,7 +30,7 @@ public:
~SieveEditorManageSieveWidget() override;
protected:
bool refreshList() override;
Q_REQUIRED_RESULT bool refreshList() override;
};
#endif // SIEVEEDITORMANAGESIEVEWIDGET_H
......@@ -38,26 +38,26 @@ public:
~SieveEditorPageWidget();
void loadScript(const KSieveUi::ManageSieveWidget::ScriptInfo &info);
QUrl currentUrl() const;
Q_REQUIRED_RESULT QUrl currentUrl() const;
void setCurrentUrl(const QUrl &url);
void setIsNewScript(bool isNewScript);
void uploadScript(bool showInformation = true, bool forceSave = false);
bool needToSaveScript();
Q_REQUIRED_RESULT bool needToSaveScript();
bool isModified() const;
Q_REQUIRED_RESULT bool isModified() const;
void goToLine();
KSieveUi::SieveEditorWidget::EditorMode pageMode() const;
Q_REQUIRED_RESULT KSieveUi::SieveEditorWidget::EditorMode pageMode() const;
void find();
void replace();
void redo();
void undo();
bool isUndoAvailable() const;
bool isRedoAvailable() const;
Q_REQUIRED_RESULT bool isUndoAvailable() const;
Q_REQUIRED_RESULT bool isRedoAvailable() const;
void paste();
void cut();
void copy();
bool hasSelection() const;
Q_REQUIRED_RESULT bool hasSelection() const;
void selectAll();
void saveAs();
......@@ -74,20 +74,20 @@ public:
void reverseCase();
void zoomIn();
void zoomOut();
QString currentText() const;
QString currentHelpTitle() const;
QUrl currentHelpUrl() const;
Q_REQUIRED_RESULT QString currentText() const;
Q_REQUIRED_RESULT QString currentHelpTitle() const;
Q_REQUIRED_RESULT QUrl currentHelpUrl() const;
void openBookmarkUrl(const QUrl &url);
void debugSieveScript();
void zoomReset();
void wordWrap(bool state);
bool isWordWrap() const;
Q_REQUIRED_RESULT bool isWordWrap() const;
void print();
void printPreview();
bool printSupportEnabled() const;
bool isTextEditor() const;
void renameScriptName(const QString &newName);
bool uploadScriptAndCloseTab(int index);
Q_REQUIRED_RESULT bool uploadScriptAndCloseTab(int index);
Q_SIGNALS:
void refreshList();
void scriptModified(bool, SieveEditorPageWidget *);
......
......@@ -37,8 +37,8 @@ struct LIBSIEVEEDITOR_EXPORT SieveAccountSettings {
{
}
bool operator ==(const SieveAccountSettings &other) const;
bool isValid() const;
Q_REQUIRED_RESULT bool operator ==(const SieveAccountSettings &other) const;
Q_REQUIRED_RESULT bool isValid() const;
QString serverName;
QString userName;
QString password;
......@@ -53,8 +53,8 @@ struct LIBSIEVEEDITOR_EXPORT SieveServerConfig {
{
}
bool isValid() const;
QUrl url() const;
Q_REQUIRED_RESULT bool isValid() const;
Q_REQUIRED_RESULT QUrl url() const;
SieveAccountSettings sieveSettings;
KSieveUi::SieveImapAccountSettings sieveImapAccountSettings;
bool operator ==(const SieveServerConfig &other) const;
......
......@@ -29,7 +29,7 @@ public:
explicit SievePurposeMenuWidget(QWidget *parentWidget, QObject *parent = nullptr);
~SievePurposeMenuWidget() override;
QByteArray text() override;
Q_REQUIRED_RESULT QByteArray text() override;
void setEditorWidget(SieveEditorMainWidget *editor);
private:
SieveEditorMainWidget *mSieveEditorWidget = nullptr;
......
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