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/errordialoghandler.h | |
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/errordialoghandler.h')
-rw-r--r-- | src/errordialoghandler.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/errordialoghandler.h b/src/errordialoghandler.h index 6bd26bddd8..285546b079 100644 --- a/src/errordialoghandler.h +++ b/src/errordialoghandler.h @@ -152,8 +152,7 @@ class ErrorDialogHandler : public QObject { // requested message box. They return false if a dialog with the same key // (or title if no key) is already displayed. If shouldQuit is true, Mixxx // will shut down. - bool requestErrorDialog(DialogType type, QString message, - bool shouldQuit = false); + bool requestErrorDialog(DialogType type, const QString& message, bool shouldQuit = false); bool requestErrorDialog(ErrorDialogProperties* props); // Allows a means for main() to skip exec() if there was a critical or fatal @@ -162,12 +161,12 @@ class ErrorDialogHandler : public QObject { signals: void showErrorDialog(ErrorDialogProperties* props); - void stdButtonClicked(QString key, QMessageBox::StandardButton whichStdButton); + void stdButtonClicked(const QString& key, QMessageBox::StandardButton whichStdButton); private slots: /** Actually displays the box */ void errorDialog(ErrorDialogProperties* props); - void boxClosed(QString key, QMessageBox* msgBox); + void boxClosed(const QString& key, QMessageBox* msgBox); private: // Private constructor |