Commit 9cb5c573 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent 5d574549
......@@ -31,17 +31,17 @@ public:
void showConfigureDialog(qlonglong windowId = 0);
void setEnableAgent(bool b);
bool enabledAgent() const;
Q_REQUIRED_RESULT bool enabledAgent() const;
void reload();
bool receiveNotes() const;
Q_REQUIRED_RESULT bool receiveNotes() const;
void setReceiveNotes(bool b);
void setPort(int value);
int port() const;
Q_REQUIRED_RESULT int port() const;
int alarmCheckInterval() const;
Q_REQUIRED_RESULT int alarmCheckInterval() const;
void setAlarmCheckInterval(int value);
void configurationChanged();
......
......@@ -44,7 +44,7 @@ public:
explicit NoteAlarmDialog(const QString &caption, QWidget *parent = nullptr);
~NoteAlarmDialog();
void setAlarm(const QDateTime &dateTime);
QDateTime alarm() const;
Q_REQUIRED_RESULT QDateTime alarm() const;
private:
void slotButtonChanged(int);
......
......@@ -30,18 +30,18 @@ public:
NoteAlarmAttribute();
~NoteAlarmAttribute() override;
QByteArray type() const override;
Q_REQUIRED_RESULT QByteArray type() const override;
NoteAlarmAttribute *clone() const override;
QByteArray serialized() const override;
Q_REQUIRED_RESULT QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
void setDateTime(const QDateTime &dateTime);
QDateTime dateTime() const;
Q_REQUIRED_RESULT QDateTime dateTime() const;
bool operator ==(const NoteAlarmAttribute &other) const;
Q_REQUIRED_RESULT bool operator ==(const NoteAlarmAttribute &other) const;
private:
QDateTime mDateTime;
};
......
......@@ -34,48 +34,48 @@ public:
NoteDisplayAttribute();
~NoteDisplayAttribute() override;
QByteArray type() const override;
Q_REQUIRED_RESULT QByteArray type() const override;
NoteDisplayAttribute *clone() const override;
QByteArray serialized() const override;
Q_REQUIRED_RESULT QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
void setBackgroundColor(const QColor &color);
QColor backgroundColor() const;
QColor foregroundColor() const;
Q_REQUIRED_RESULT QColor backgroundColor() const;
Q_REQUIRED_RESULT QColor foregroundColor() const;
void setForegroundColor(const QColor &color);
QSize size() const;
Q_REQUIRED_RESULT QSize size() const;
void setSize(const QSize &size);
bool rememberDesktop() const;
Q_REQUIRED_RESULT bool rememberDesktop() const;
void setRememberDesktop(bool b);
void setTabSize(int value);
int tabSize() const;
Q_REQUIRED_RESULT int tabSize() const;
void setFont(const QFont &f);
QFont font() const;
Q_REQUIRED_RESULT QFont font() const;
void setTitleFont(const QFont &f);
QFont titleFont() const;
Q_REQUIRED_RESULT QFont titleFont() const;
void setDesktop(int v);
int desktop() const;
Q_REQUIRED_RESULT int desktop() const;
void setIsHidden(bool b);
bool isHidden() const;
Q_REQUIRED_RESULT bool isHidden() const;
void setPosition(const QPoint &pos);
QPoint position() const;
Q_REQUIRED_RESULT QPoint position() const;
void setShowInTaskbar(bool b);
bool showInTaskbar() const;
Q_REQUIRED_RESULT bool showInTaskbar() const;
void setKeepAbove(bool b);
bool keepAbove() const;
Q_REQUIRED_RESULT bool keepAbove() const;
void setKeepBelow(bool b);
bool keepBelow() const;
Q_REQUIRED_RESULT bool keepBelow() const;
bool autoIndent() const;
Q_REQUIRED_RESULT bool autoIndent() const;
void setAutoIndent(bool b);
bool operator ==(const NoteDisplayAttribute &other) const;
Q_REQUIRED_RESULT bool operator ==(const NoteDisplayAttribute &other) const;
private:
QFont mFont;
......
......@@ -33,11 +33,11 @@ public:
NoteLockAttribute();
~NoteLockAttribute() override;
QByteArray type() const override;
Q_REQUIRED_RESULT QByteArray type() const override;
NoteLockAttribute *clone() const override;
Q_REQUIRED_RESULT NoteLockAttribute *clone() const override;
QByteArray serialized() const override;
Q_REQUIRED_RESULT QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
};
......
......@@ -30,8 +30,8 @@ public:
~ShowFolderNotesAttribute() override;
ShowFolderNotesAttribute *clone() const override;
QByteArray type() const override;
QByteArray serialized() const override;
Q_REQUIRED_RESULT QByteArray type() const override;
Q_REQUIRED_RESULT QByteArray serialized() const override;
void deserialize(const QByteArray &data) override;
};
}
......
......@@ -50,11 +50,11 @@ public:
explicit NoteHostDialog(const QString &caption, QWidget *parent = nullptr);
~NoteHostDialog();
QString host() const;
Q_REQUIRED_RESULT QString host() const;
/**
* Returns 0 if port was not specified
*/
quint16 port() const;
Q_REQUIRED_RESULT quint16 port() const;
private:
void slotTextChanged(const QString &);
......
......@@ -32,7 +32,7 @@ public:
void createIfMissing();
static QString akonadiNotesInstanceName();
static Q_REQUIRED_RESULT QString akonadiNotesInstanceName();
protected:
virtual void finishCreateResource();
......
......@@ -36,11 +36,11 @@ public:
void addNotes(const Akonadi::Item::List &notes);
void removeNote(const Akonadi::Item &note);
Akonadi::Item::Id itemId(QListWidgetItem *item) const;
Q_REQUIRED_RESULT Akonadi::Item::Id itemId(QListWidgetItem *item) const;
Akonadi::Item::Id currentItemId() const;
Q_REQUIRED_RESULT Akonadi::Item::Id currentItemId() const;
Akonadi::Item::List selectedNotes() const;
Q_REQUIRED_RESULT Akonadi::Item::List selectedNotes() const;
private:
void createItem(const Akonadi::Item &note);
......
......@@ -55,17 +55,17 @@ public:
void setChangeItem(const Akonadi::Item &item, const QSet<QByteArray> &set = QSet<QByteArray>());
void saveNote(bool force = false, bool sync = false);
QString name() const;
QString text() const;
Akonadi::Item::Id noteId() const;
Q_REQUIRED_RESULT QString name() const;
Q_REQUIRED_RESULT QString text() const;
Q_REQUIRED_RESULT Akonadi::Item::Id noteId() const;
Akonadi::Item item() const;
Q_REQUIRED_RESULT Akonadi::Item item() const;
void setName(const QString &name);
void setText(const QString &text);
bool isModified() const;
bool isDesktopAssigned() const;
Q_REQUIRED_RESULT bool isModified() const;
Q_REQUIRED_RESULT bool isDesktopAssigned() const;
void toDesktop(int desktop);
......
......@@ -30,8 +30,8 @@ public:
explicit KNoteButton(const QString &icon, QWidget *parent = nullptr);
~KNoteButton() override;
int heightForWidth(int w) const override;
QSize sizeHint() const override;
Q_REQUIRED_RESULT int heightForWidth(int w) const override;
Q_REQUIRED_RESULT QSize sizeHint() const override;
protected:
void enterEvent(QEvent *) override;
......
......@@ -36,21 +36,21 @@ public:
void setDisplayAttribute(const NoteShared::NoteDisplayAttribute *attr);
const NoteShared::NoteDisplayAttribute *displayAttribute() const;
QColor backgroundColor() const;
QColor foregroundColor() const;
QSize size() const;
bool rememberDesktop() const;
int tabSize() const;
QFont font() const;
QFont titleFont() const;
int desktop() const;
bool isHidden() const;
QPoint position() const;
bool showInTaskbar() const;
bool keepAbove() const;
bool keepBelow() const;
bool autoIndent() const;
Q_REQUIRED_RESULT QColor backgroundColor() const;
Q_REQUIRED_RESULT QColor foregroundColor() const;
Q_REQUIRED_RESULT QSize size() const;
Q_REQUIRED_RESULT bool rememberDesktop() const;
Q_REQUIRED_RESULT int tabSize() const;
Q_REQUIRED_RESULT QFont font() const;
Q_REQUIRED_RESULT QFont titleFont() const;
Q_REQUIRED_RESULT int desktop() const;
Q_REQUIRED_RESULT bool isHidden() const;
Q_REQUIRED_RESULT QPoint position() const;
Q_REQUIRED_RESULT bool showInTaskbar() const;
Q_REQUIRED_RESULT bool keepAbove() const;
Q_REQUIRED_RESULT bool keepBelow() const;
Q_REQUIRED_RESULT bool autoIndent() const;
private:
const NoteShared::NoteDisplayAttribute *mDisplayAttribute = nullptr;
......
......@@ -19,13 +19,13 @@
#ifndef KNOTEINTERFACE_H
#define KNOTEINTERFACE_H
#include "knotes_export.h"
#include <QObject>
class KNOTES_EXPORT KNoteInterface
{
public:
KNoteInterface();
void setBlockSave(bool b);
bool blockSave() const;
Q_REQUIRED_RESULT bool blockSave() const;
protected:
bool mBlockSave;
......
......@@ -33,7 +33,7 @@ public:
explicit KNoteGrantleePrint(const QString &themePath);
~KNoteGrantleePrint();
QString notesToHtml(const QList<KNotePrintObject *> &lst);
Q_REQUIRED_RESULT QString notesToHtml(const QList<KNotePrintObject *> &lst);
};
#endif // KNOTEGRANTLEEPRINT_H
......@@ -37,7 +37,7 @@ public:
~KNotePrinter();
void setDefaultFont(const QFont &font);
QFont defaultFont() const;
Q_REQUIRED_RESULT QFont defaultFont() const;
void printNotes(const QList<KNotePrintObject *> &lst, const QString &themePath, bool preview);
private Q_SLOTS:
......
......@@ -40,13 +40,13 @@ public:
explicit KNotePrintObject(const Akonadi::Item &item, QObject *parent = nullptr);
~KNotePrintObject();
QString description() const;
QString name() const;
QString currentDateTime() const;
bool hasAlarm() const;
QString alarm() const;
bool isLock() const;
QString backgroundColorName() const;
Q_REQUIRED_RESULT QString description() const;
Q_REQUIRED_RESULT QString name() const;
Q_REQUIRED_RESULT QString currentDateTime() const;
Q_REQUIRED_RESULT bool hasAlarm() const;
Q_REQUIRED_RESULT QString alarm() const;
Q_REQUIRED_RESULT bool isLock() const;
Q_REQUIRED_RESULT QString backgroundColorName() const;
private:
Akonadi::Item mItem;
};
......
......@@ -37,10 +37,10 @@ public:
void setNotes(const QHash<Akonadi::Item::Id, KNote *> &notes);
QList<KNotePrintObject *> selectedNotes() const;
QString selectedTheme() const;
Q_REQUIRED_RESULT QList<KNotePrintObject *> selectedNotes() const;
Q_REQUIRED_RESULT QString selectedTheme() const;
bool preview() const;
Q_REQUIRED_RESULT bool preview() const;
private Q_SLOTS:
void slotPreview();
......
......@@ -30,7 +30,7 @@ public:
explicit KNotePrintSelectThemeComboBox(QWidget *parent = nullptr);
~KNotePrintSelectThemeComboBox();
QString selectedTheme() const;
Q_REQUIRED_RESULT QString selectedTheme() const;
void loadThemes();
void selectDefaultTheme();
......
......@@ -31,7 +31,7 @@ public:
explicit KNotePrintSelectThemeDialog(QWidget *parent = nullptr);
~KNotePrintSelectThemeDialog();
QString selectedTheme() const;
Q_REQUIRED_RESULT QString selectedTheme() const;
private:
KNotePrintSelectThemeComboBox *mThemes = 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