diff options
| author | Matthias Fuchs <[email protected]> | 2009-10-27 12:33:40 +0000 |
|---|---|---|
| committer | Matthias Fuchs <[email protected]> | 2009-10-27 12:33:40 +0000 |
| commit | 1201c618842c8c03825be82478f923874d24f690 (patch) | |
| tree | 1eb96b405d93b73bb90a1cdb31c118e07442076d /src | |
| parent | b7fae99c59f5d3239495d62a31a2112d1232cd70 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/search/dolphinsearchbox.cpp | 13 | ||||
| -rw-r--r-- | src/search/dolphinsearchbox.h | 1 |
2 files changed, 0 insertions, 14 deletions
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: |
