From 5c970100f11b88b61d2945018a6b447c3e5c64ce Mon Sep 17 00:00:00 2001 From: Phenom Date: Sat, 22 Aug 2015 16:31:08 +0200 Subject: [PATCH] Fix ChatWidget search text label threshold. --- retroshare-gui/src/gui/chat/ChatWidget.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index 5e8067577..204caec07 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -586,14 +586,14 @@ bool ChatWidget::eventFilter(QObject *obj, QEvent *event) QKeyEvent *keyEvent = static_cast(event); if (keyEvent) { QString qsTextToFind=ui->leSearch->text(); - if (((qsTextToFind.length()>iCharToStartSearch) || (keyEvent->key()==Qt::Key_Return)) && (keyEvent->text().length()>0)) + if (keyEvent->key()==Qt::Key_Backspace) { + qsTextToFind=qsTextToFind.left(qsTextToFind.length()-1);// "\010" + } else if (keyEvent->key()==Qt::Key_Tab) { // "\011" + } else if (keyEvent->key()==Qt::Key_Return) { // "\015" + } else if (keyEvent->text().length()==1) + qsTextToFind+=keyEvent->text(); + if (((qsTextToFind.length()>=iCharToStartSearch) || (keyEvent->key()==Qt::Key_Return)) && (keyEvent->text().length()>0)) { - if (keyEvent->key()==Qt::Key_Backspace) { - qsTextToFind=qsTextToFind.left(qsTextToFind.length()-1);// "\010" - } else if (keyEvent->key()==Qt::Key_Tab) { // "\011" - } else if (keyEvent->key()==Qt::Key_Return) { // "\015" - } else if (keyEvent->text().length()==1) - qsTextToFind+=keyEvent->text(); findText(qsTextToFind); } else {