commit 91f3f27545121e5869c74db8d68a34908ab01ad4
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Sep 12 17:52:57 2024 +0200

    GuiWorkArea: pass KeySymbol parameters as const references
    
    Spotted by Coverity scan.
---
 src/frontends/qt/GuiWorkArea.cpp | 2 +-
 src/frontends/qt/GuiWorkArea.h   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index c643a30192..0535ee70d1 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -1037,7 +1037,7 @@ bool CompressorProxy::emitCheck(bool isAutoRepeat)
 }
 
 
-void CompressorProxy::slot(KeySymbol sym, KeyModifier mod, bool isAutoRepeat)
+void CompressorProxy::slot(KeySymbol const & sym, KeyModifier mod, bool 
isAutoRepeat)
 {
        if (emitCheck(isAutoRepeat))
                Q_EMIT signal(sym, mod);
diff --git a/src/frontends/qt/GuiWorkArea.h b/src/frontends/qt/GuiWorkArea.h
index 4d9e64d53f..391c311243 100644
--- a/src/frontends/qt/GuiWorkArea.h
+++ b/src/frontends/qt/GuiWorkArea.h
@@ -102,7 +102,7 @@ Q_SIGNALS:
        ///
        void bufferViewChanged();
        /// send key event to CompressorProxy
-       void compressKeySym(KeySymbol sym, KeyModifier mod, bool isAutoRepeat);
+       void compressKeySym(KeySymbol const & sym, KeyModifier mod, bool 
isAutoRepeat);
 
 private Q_SLOTS:
        /// Scroll the BufferView.
@@ -170,9 +170,9 @@ class CompressorProxy : public QObject
        bool emitCheck(bool isAutoRepeat);
        bool flag_;
        // input: event to compress
-       Q_SLOT void slot(KeySymbol sym, KeyModifier mod, bool isAutoRepeat);
+       Q_SLOT void slot(KeySymbol const & sym, KeyModifier mod, bool 
isAutoRepeat);
        // output: compressed event
-    Q_SIGNAL void signal(KeySymbol sym, KeyModifier mod);
+    Q_SIGNAL void signal(KeySymbol const & sym, KeyModifier mod);
 public:
     // No default constructor, since the proxy must be a child of the
     // target object.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to