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
This commit is contained in:
Matthias Fuchs 2009-10-27 12:33:40 +00:00
parent b7fae99c59
commit 1201c61884
2 changed files with 0 additions and 14 deletions

View 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),

View file

@ -43,7 +43,6 @@ public:
public slots:
void highlighted(const QModelIndex& index);
void activated(const QModelIndex& index);
void slotTextEdited(const QString &text);
private: