diff options
author | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-17 20:02:14 +0100 |
---|---|---|
committer | Jan Holthuis <jan.holthuis@ruhr-uni-bochum.de> | 2020-11-19 19:46:54 +0100 |
commit | 4e1bebf0f5e06ecdd99c41771e7b4ee19c0cdcf3 (patch) | |
tree | d0e98cee9eef416282049092ea93b0b2b6eb417d /src/network | |
parent | 133ea1e3d6547964f014144eee15590ea449c7af (diff) |
Pass non-trivial/large function args by reference
Fixes a bunch of `-Wclazy-function-args-by-ref` warnings. See
https://github.com/KDE/clazy/blob/master/docs/checks/README-function-args-by-ref.md
for details.
Most of these changes are automated, using the clazy fixit by setting
the `CLAZY_EXPORT_FIXES` before compilation and then running:
$ mkdir /tmp/patch
$ find ../src -iname "*.yaml" -exec mv {} /tmp/patch \;
$ clang-apply-replacements /tmp/patch
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/jsonwebtask.h | 2 | ||||
-rw-r--r-- | src/network/webtask.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/network/jsonwebtask.h b/src/network/jsonwebtask.h index 9c653d7c6b..ca83ccea30 100644 --- a/src/network/jsonwebtask.h +++ b/src/network/jsonwebtask.h @@ -61,7 +61,7 @@ class JsonWebTask : public WebTask { signals: void failed( - network::JsonWebResponse response); + const network::JsonWebResponse& response); private slots: void slotNetworkReplyFinished(); diff --git a/src/network/webtask.h b/src/network/webtask.h index 4a78a8fa79..8735d3c824 100644 --- a/src/network/webtask.h +++ b/src/network/webtask.h @@ -128,12 +128,12 @@ class WebTask : public QObject { // is finally deleted. If no receiver is connected the task // will be deleted implicitly. void aborted( - QUrl requestUrl); + const QUrl& requestUrl); void networkError( - QUrl requestUrl, + const QUrl& requestUrl, QNetworkReply::NetworkError errorCode, - QString errorString, - QByteArray errorContent); + const QString& errorString, + const QByteArray& errorContent); protected: template<typename S> |