Commit 1638f91e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent ffa1d0fe
Pipeline #62643 canceled with stage
......@@ -31,7 +31,7 @@ public:
Q_REQUIRED_RESULT QVector<PimCommon::PluginUtilData> pluginsDataList() const;
Q_REQUIRED_RESULT QString configPrefixSettingKey() const;
Q_REQUIRED_RESULT QString configGroupName() const;
MessageViewerConfigureSettingsPlugin *pluginFromIdentifier(const QString &id);
Q_REQUIRED_RESULT MessageViewerConfigureSettingsPlugin *pluginFromIdentifier(const QString &id);
private:
MessageViewerConfigureSettingsPluginManagerPrivate *const d;
......
......@@ -20,7 +20,7 @@ public:
static const Interface::BodyPartFormatter *create();
private:
bool isMailmanMessage(KMime::Content *curNode) const;
Q_REQUIRED_RESULT bool isMailmanMessage(KMime::Content *curNode) const;
};
}
......@@ -32,7 +32,7 @@ public:
return m_auditLog;
}
GpgME::Error auditLogError() const
Q_REQUIRED_RESULT GpgME::Error auditLogError() const
{
return m_auditLogError;
}
......
......@@ -29,7 +29,7 @@ public:
explicit DecryptVerifyBodyPartMemento(QGpgME::DecryptVerifyJob *job, const QByteArray &cipherText);
~DecryptVerifyBodyPartMemento() override;
bool start() override;
Q_REQUIRED_RESULT bool start() override;
void exec() override;
const QByteArray &plainText() const
......
......@@ -107,7 +107,7 @@ public:
CLanguage
};
QMenu *menu() const;
Q_REQUIRED_RESULT QMenu *menu() const;
void fillMenu();
void fillSubMenus();
......
......@@ -30,9 +30,9 @@ public:
void setUrl(const QUrl &url);
void start();
bool canStart() const;
Q_REQUIRED_RESULT bool canStart() const;
QByteArray jsonRequest() const;
Q_REQUIRED_RESULT QByteArray jsonRequest() const;
void parse(const QByteArray &replyStr);
Q_SIGNALS:
......
......@@ -15,16 +15,16 @@ namespace CheckPhishingUrlUtil
{
enum UrlStatus { Ok = 0, MalWare = 1, BrokenNetwork = 2, InvalidUrl = 3, Unknown = 4 };
QString apiKey();
WEBENGINEVIEWER_EXPORT QString versionApps();
QString databaseFileName();
WEBENGINEVIEWER_EXPORT QString configFileName();
WEBENGINEVIEWER_EXPORT quint16 minorVersion();
WEBENGINEVIEWER_EXPORT quint16 majorVersion();
WEBENGINEVIEWER_EXPORT double convertToSecond(const QString &str);
Q_REQUIRED_RESULT QString apiKey();
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT QString versionApps();
Q_REQUIRED_RESULT QString databaseFileName();
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT QString configFileName();
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT quint16 minorVersion();
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT quint16 majorVersion();
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT double convertToSecond(const QString &str);
WEBENGINEVIEWER_EXPORT uint refreshingCacheAfterThisTime(double seconds);
WEBENGINEVIEWER_EXPORT bool cachedValueStillValid(uint seconds);
WEBENGINEVIEWER_EXPORT int generateRandomSecondValue(int numberOfFailed);
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT bool cachedValueStillValid(uint seconds);
WEBENGINEVIEWER_EXPORT Q_REQUIRED_RESULT int generateRandomSecondValue(int numberOfFailed);
}
}
Q_DECLARE_METATYPE(WebEngineViewer::CheckPhishingUrlUtil::UrlStatus)
......@@ -25,7 +25,7 @@ public:
~CreateDatabaseFileJob() override;
void start();
void setFileName(const QString &filename);
bool canStart() const;
Q_REQUIRED_RESULT bool canStart() const;
void setUpdateDataBaseInfo(const WebEngineViewer::UpdateDataBaseInfo &infoDataBase);
Q_SIGNALS:
......
......@@ -35,12 +35,12 @@ public:
bool reload();
Q_REQUIRED_RESULT bool isValid() const;
quint16 getUint16(int offset) const;
quint32 getUint32(int offset) const;
quint64 getUint64(int offset) const;
Q_REQUIRED_RESULT quint16 getUint16(int offset) const;
Q_REQUIRED_RESULT quint32 getUint32(int offset) const;
Q_REQUIRED_RESULT quint64 getUint64(int offset) const;
const char *getCharStar(int offset) const;
QByteArray searchHash(const QByteArray &hashToSearch);
Q_REQUIRED_RESULT QByteArray searchHash(const QByteArray &hashToSearch);
Q_REQUIRED_RESULT bool shouldCheck() const;
Q_REQUIRED_RESULT bool checkFileChanged();
......
......@@ -18,11 +18,11 @@ public:
RiceDecoder(int riceParameter, int numberEntries, const QByteArray &encodingData);
~RiceDecoder();
bool hasOtherEntries() const;
bool nextValue(uint32_t *value);
bool nextBits(unsigned int num_requested_bits, uint32_t *x);
uint32_t bitsFromCurrentWord(unsigned int num_requested_bits);
bool nextWord(uint32_t *word);
Q_REQUIRED_RESULT bool hasOtherEntries() const;
Q_REQUIRED_RESULT bool nextValue(uint32_t *value);
Q_REQUIRED_RESULT bool nextBits(unsigned int num_requested_bits, uint32_t *x);
Q_REQUIRED_RESULT uint32_t bitsFromCurrentWord(unsigned int num_requested_bits);
Q_REQUIRED_RESULT bool nextWord(uint32_t *word);
private:
QByteArray mEncodingData;
......
......@@ -27,12 +27,12 @@ public:
~SearchFullHashJob();
void start();
bool canStart() const;
Q_REQUIRED_RESULT bool canStart() const;
void setDatabaseState(const QStringList &hash);
void setSearchFullHashForUrl(const QUrl &url);
QByteArray jsonRequest() const;
Q_REQUIRED_RESULT QByteArray jsonRequest() const;
void parse(const QByteArray &replyStr);
void setSearchHashs(const QHash<QByteArray, QByteArray> &hash);
......
......@@ -16,7 +16,7 @@ struct Addition;
struct Removal;
struct WEBENGINEVIEWER_EXPORT UpdateDataBaseInfo {
UpdateDataBaseInfo();
bool isValid() const;
Q_REQUIRED_RESULT bool isValid() const;
enum ResponseType { Unknown = 0, FullUpdate = 1, PartialUpdate = 2 };
......
......@@ -19,12 +19,12 @@ public:
explicit UrlHashing(const QUrl &url);
~UrlHashing();
static QString canonicalizeUrl(QUrl url);
static QStringList generatePathsToCheck(const QString &str, const QString &query);
static QStringList generateHostsToCheck(const QString &str);
static Q_REQUIRED_RESULT QString canonicalizeUrl(QUrl url);
static Q_REQUIRED_RESULT QStringList generatePathsToCheck(const QString &str, const QString &query);
static Q_REQUIRED_RESULT QStringList generateHostsToCheck(const QString &str);
/*long hash, short hash*/
QHash<QByteArray, QByteArray> hashList() const;
Q_REQUIRED_RESULT QHash<QByteArray, QByteArray> hashList() const;
private:
const QUrl mUrl;
......
......@@ -18,7 +18,7 @@ class WEBENGINEVIEWER_EXPORT DeveloperToolDialog : public QDialog
public:
explicit DeveloperToolDialog(QWidget *parent = nullptr);
~DeveloperToolDialog() override;
QWebEnginePage *enginePage() const;
Q_REQUIRED_RESULT QWebEnginePage *enginePage() const;
private:
void readConfig();
......
......@@ -18,7 +18,7 @@ class WEBENGINEVIEWER_TESTS_EXPORT DeveloperToolWidget : public QWidget
public:
explicit DeveloperToolWidget(QWidget *parent = nullptr);
~DeveloperToolWidget() override;
QWebEnginePage *enginePage() const;
Q_REQUIRED_RESULT QWebEnginePage *enginePage() const;
private:
QWebEngineView *const mWebEngineView;
......
......@@ -24,7 +24,7 @@ public:
~NetworkPluginUrlInterceptor() override;
virtual NetworkPluginUrlInterceptorInterface *createInterface(QWebEngineView *webEngine, QObject *parent = nullptr) = 0;
virtual bool hasConfigureDialog() const;
virtual Q_REQUIRED_RESULT bool hasConfigureDialog() const;
virtual void showConfigureDialog(QWidget *parent = nullptr);
void setIsEnabled(bool enabled);
......
......@@ -62,7 +62,7 @@ public:
void saveHtml(QWebEngineDownloadItem *download);
Q_REQUIRED_RESULT bool execPrintPreviewPage(QPrinter *printer, int timeout);
QPoint mapToViewport(const QPoint &pos) const;
Q_REQUIRED_RESULT QPoint mapToViewport(const QPoint &pos) const;
Q_SIGNALS:
void urlClicked(const QUrl &url);
void showConsoleMessage(const QString &message);
......
......@@ -34,7 +34,7 @@ public:
void setActionCollection(KActionCollection *ac);
void setZoomFactor(qreal zoomFactor);
qreal zoomFactor() const;
Q_REQUIRED_RESULT qreal zoomFactor() const;
void setWebViewerZoomFactor(qreal zoomFactor);
......
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