From 1201c618842c8c03825be82478f923874d24f690 Mon Sep 17 00:00:00 2001 From: Matthias Fuchs Date: Tue, 27 Oct 2009 12:33:40 +0000 Subject: [PATCH] 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 --- src/search/dolphinsearchbox.cpp | 13 ------------- src/search/dolphinsearchbox.h | 1 - 2 files changed, 14 deletions(-) diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index f88f16f0af..d1a97d9a2a 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 0186125645..e3f07a265c 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: