From: Matthias Fuchs Date: Tue, 27 Oct 2009 12:33:40 +0000 (+0000) Subject: Fixes double inserting of terms, interestingly this problem did not existed before... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/1201c618842c8c03825be82478f923874d24f690 Fixes double inserting of terms, interestingly this problem did not existed before than the code was written. svn path=/trunk/KDE/kdebase/apps/; revision=1041128 --- diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index f88f16f0a..d1a97d9a2 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -96,7 +96,6 @@ DolphinSearchCompleter::DolphinSearchCompleter(KLineEdit* linedit) : view->setHeaderHidden(true); connect(q, SIGNAL(textEdited(QString)), this, SLOT(slotTextEdited(QString))); - connect(m_completer, SIGNAL(activated(QModelIndex)), this, SLOT(activated(QModelIndex))); connect(m_completer, SIGNAL(highlighted(QModelIndex)), this, SLOT(highlighted(QModelIndex))); } @@ -233,18 +232,6 @@ void DolphinSearchCompleter::highlighted(const QModelIndex& index) q->setCursorPosition(wordStart + replace.length()); } -void DolphinSearchCompleter::activated(const QModelIndex& index) -{ - if ((m_wordStart == -1) || (m_wordStart == -1)) { - return; - } - - const QString replace = index.sibling(index.row(), 0).data(Qt::UserRole).toString(); - QString newText = q->text(); - newText.replace(m_wordStart, m_wordEnd - m_wordStart + 1, replace); - q->setText(newText); -} - DolphinSearchBox::DolphinSearchBox(QWidget* parent) : QWidget(parent), m_searchInput(0), diff --git a/src/search/dolphinsearchbox.h b/src/search/dolphinsearchbox.h index 018612564..e3f07a265 100644 --- a/src/search/dolphinsearchbox.h +++ b/src/search/dolphinsearchbox.h @@ -43,7 +43,6 @@ public: public slots: void highlighted(const QModelIndex& index); - void activated(const QModelIndex& index); void slotTextEdited(const QString &text); private: