Getters of complex types should be const reference if possible

This commit is contained in:
Rasmus Karlsson 2017-01-05 16:53:57 +01:00
parent 8411d71741
commit dc26c86268

6
word.h
View file

@ -49,7 +49,7 @@ public:
return *image; return *image;
} }
QString& getText() { const QString& getText() {
return text; return text;
} }
@ -77,7 +77,7 @@ public:
return m_isImage; return m_isImage;
} }
QString& copyText() { const QString& copyText() {
return m_copyText; return m_copyText;
} }
@ -93,7 +93,7 @@ public:
return m_type; return m_type;
} }
QString& tooltip() { const QString& tooltip() {
return m_tooltip; return m_tooltip;
} }