mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05:00
Fix ChatWidget search text label threshold.
This commit is contained in:
parent
48c3eedcf5
commit
5c970100f1
@ -586,14 +586,14 @@ bool ChatWidget::eventFilter(QObject *obj, QEvent *event)
|
||||
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(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 {
|
||||
|
Loading…
Reference in New Issue
Block a user