summaryrefslogtreecommitdiffstats
path: root/src/errordialoghandler.cpp
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/errordialoghandler.cpp
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/errordialoghandler.cpp')
-rw-r--r--src/errordialoghandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/errordialoghandler.cpp b/src/errordialoghandler.cpp
index 3f302bb7b2..650a6f5dbd 100644
--- a/src/errordialoghandler.cpp
+++ b/src/errordialoghandler.cpp
@@ -89,8 +89,8 @@ ErrorDialogProperties* ErrorDialogHandler::newDialogProperties() {
return new ErrorDialogProperties();
}
-bool ErrorDialogHandler::requestErrorDialog(DialogType type, QString message,
- bool shouldQuit) {
+bool ErrorDialogHandler::requestErrorDialog(
+ DialogType type, const QString& message, bool shouldQuit) {
if (!s_bEnabled) {
return false;
}
@@ -213,7 +213,7 @@ void ErrorDialogHandler::errorDialog(ErrorDialogProperties* pProps) {
}
}
-void ErrorDialogHandler::boxClosed(QString key, QMessageBox* msgBox) {
+void ErrorDialogHandler::boxClosed(const QString& key, QMessageBox* msgBox) {
QMutexLocker locker(&m_mutex);
locker.unlock();