diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-03-19 15:29:13 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-20 09:47:57 -0700 |
commit | 30770f5d8567e99b5b3c1c6c812ee00e19f67d9c (patch) | |
tree | 48b70cdb4b76e81f512e9d0ff425c6e7f256c6ab /qt-ui/tagwidget.h | |
parent | 3d83c48c496388586408fc418f027b726bf8d184 (diff) | |
download | subsurface-30770f5d8567e99b5b3c1c6c812ee00e19f67d9c.tar.gz |
Do not copy strings when you don't need it.
This patch removed the use of copy-constructors on the QString to use the
const-references. Even knowing that the QString is a refcounted class,
let's not get that bad habit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/tagwidget.h')
-rw-r--r-- | qt-ui/tagwidget.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-ui/tagwidget.h b/qt-ui/tagwidget.h index 42c94b4e0..62fa36f30 100644 --- a/qt-ui/tagwidget.h +++ b/qt-ui/tagwidget.h @@ -12,15 +12,15 @@ public: void setCompleter(QCompleter *completer); QPair<int, int> getCursorTagPosition(); void highlight(); - void setText(QString text); + void setText(const QString& text); void clear(); void setCursorPosition(int position); void wheelEvent(QWheelEvent *event); public slots: void reparse(); - void completionSelected(QString); - void completionHighlighted(QString); + void completionSelected(const QString& text); + void completionHighlighted(const QString& text); protected: void keyPressEvent(QKeyEvent *e); |