]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fixes double inserting of terms, interestingly this problem did not existed before...
authorMatthias Fuchs <mat69@gmx.net>
Tue, 27 Oct 2009 12:33:40 +0000 (12:33 +0000)
committerMatthias Fuchs <mat69@gmx.net>
Tue, 27 Oct 2009 12:33:40 +0000 (12:33 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=1041128

src/search/dolphinsearchbox.cpp
src/search/dolphinsearchbox.h

index f88f16f0afaed5400fe382466432cfb102931887..d1a97d9a2a95472331c28e97bc6ef3108463ad70 100644 (file)
@@ -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),
index 018612564588bda5dc5440a0148d0842566a1511..e3f07a265cc178f89f03b1fc839ee1a56fb7daa2 100644 (file)
@@ -43,7 +43,6 @@ public:
 
 public slots:
     void highlighted(const QModelIndex& index);
-    void activated(const QModelIndex& index);
     void slotTextEdited(const QString &text);
 
 private: