summaryrefslogtreecommitdiffstats
path: root/src/widget/wsingletoncontainer.h
diff options
context:
space:
mode:
authorJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-11-17 20:02:14 +0100
committerJan Holthuis <jan.holthuis@ruhr-uni-bochum.de>2020-11-19 19:46:54 +0100
commit4e1bebf0f5e06ecdd99c41771e7b4ee19c0cdcf3 (patch)
treed0e98cee9eef416282049092ea93b0b2b6eb417d /src/widget/wsingletoncontainer.h
parent133ea1e3d6547964f014144eee15590ea449c7af (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/widget/wsingletoncontainer.h')
-rw-r--r--src/widget/wsingletoncontainer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget/wsingletoncontainer.h b/src/widget/wsingletoncontainer.h
index 87812d4f94..168e263ad4 100644
--- a/src/widget/wsingletoncontainer.h
+++ b/src/widget/wsingletoncontainer.h
@@ -73,12 +73,12 @@ class SingletonMap {
// Takes a constructed QWidget and inserts it in the map of available
// singletons. Checks that an object of that name hasn't already been
// defined.
- void insertSingleton(QString objectName, QWidget* widget);
+ void insertSingleton(const QString& objectName, QWidget* widget);
// We don't want to end up with badly-constructed containers, so only
// provide a factory function. Returns NULL if the objectName is not in
// the map.
- QWidget* getSingletonWidget(QString objectName) const;
+ QWidget* getSingletonWidget(const QString& objectName) const;
private:
QMap<QString, QWidget*> m_singletons;