summaryrefslogtreecommitdiffstats
path: root/qt-ui/tagwidget.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-03-19 15:36:09 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-03-20 09:48:10 -0700
commitec2ea7ec3ad0cb7cc504aad19f8620329c5ff8b2 (patch)
treec657f61b2a80a03434d9e1613d603c844fe0ec12 /qt-ui/tagwidget.cpp
parent30770f5d8567e99b5b3c1c6c812ee00e19f67d9c (diff)
downloadsubsurface-ec2ea7ec3ad0cb7cc504aad19f8620329c5ff8b2.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/tagwidget.cpp')
-rw-r--r--qt-ui/tagwidget.cpp3
1 files changed, 1 insertions, 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) {