|
|
|
@ -582,7 +582,9 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
@@ -582,7 +582,9 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
|
|
|
|
|
for (int i = startLine; searchUp ? i >= 0 : i < numLines; searchUp ? --i : ++i) { |
|
|
|
|
ChatLine::Ptr l = lines[i]; |
|
|
|
|
|
|
|
|
|
if (l->getColumnCount() < 2) { continue; } |
|
|
|
|
if (l->getColumnCount() < 2) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ChatLineContent* content = l->getContent(1); |
|
|
|
|
Text* text = static_cast<Text*>(content); |
|
|
|
@ -596,7 +598,10 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
@@ -596,7 +598,10 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
|
|
|
|
|
|
|
|
|
|
QString txt = content->getText(); |
|
|
|
|
|
|
|
|
|
if (txt.contains(phrase, Qt::CaseInsensitive)) { |
|
|
|
|
if (!txt.contains(phrase, Qt::CaseInsensitive)) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int index = indexForSearchInLine(txt, phrase, searchUp); |
|
|
|
|
if ((index == -1 && searchPoint.y() > -1)) { |
|
|
|
|
text->deselectText(); |
|
|
|
@ -611,7 +616,6 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
@@ -611,7 +616,6 @@ bool GenericChatForm::searchInText(const QString& phrase, bool searchUp)
|
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return isSearch; |
|
|
|
|
} |
|
|
|
|