From ec2ea7ec3ad0cb7cc504aad19f8620329c5ff8b2 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 19 Mar 2014 15:36:09 -0300 Subject: QString starts empty, do not set "" as empty string. Let's not be evil by creating "" as empty strings inside of the code, really. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/tagwidget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp index 53643648f..821089c15 100644 --- a/qt-ui/tagwidget.cpp +++ b/qt-ui/tagwidget.cpp @@ -120,8 +120,7 @@ void TagWidget::reparse() QString currentText; if (pos.first >= 0 && pos.second > 0) currentText = text().mid(pos.first, pos.second - pos.first).trimmed(); - else - currentText = ""; + if (m_completer) { m_completer->setCompletionPrefix(currentText); if (m_completer->completionCount() == 1) { -- cgit v1.2.3-70-g09d2