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>
This commit is contained in:
Tomaz Canabrava 2014-03-19 15:29:13 -03:00 committed by Dirk Hohndel
parent 3d83c48c49
commit 30770f5d85
2 changed files with 7 additions and 7 deletions

View file

@ -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);