From dc26c86268f2148c45824fe90f163b4a96f9906f Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Thu, 5 Jan 2017 16:53:57 +0100 Subject: [PATCH] Getters of complex types should be const reference if possible --- word.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/word.h b/word.h index b0d0840c1..eed28fe9b 100644 --- a/word.h +++ b/word.h @@ -49,7 +49,7 @@ public: return *image; } - QString& getText() { + const QString& getText() { return text; } @@ -77,7 +77,7 @@ public: return m_isImage; } - QString& copyText() { + const QString& copyText() { return m_copyText; } @@ -93,7 +93,7 @@ public: return m_type; } - QString& tooltip() { + const QString& tooltip() { return m_tooltip; }