fixed searching
This commit is contained in:
@@ -64,29 +64,12 @@ void Message::setId(const QString &_id)
|
|||||||
// Search
|
// Search
|
||||||
const QString &Message::getSearchText() const
|
const QString &Message::getSearchText() const
|
||||||
{
|
{
|
||||||
// fourtf: asdf
|
return this->searchText;
|
||||||
// if (this->searchText.isNull()) {
|
}
|
||||||
// QString _content("");
|
|
||||||
|
|
||||||
// bool first;
|
void Message::setSearchText(const QString &value)
|
||||||
|
{
|
||||||
// for (const MessageElement &word : this->words) {
|
this->searchText = value;
|
||||||
// if (!first) {
|
|
||||||
// _content += "";
|
|
||||||
// }
|
|
||||||
|
|
||||||
// _content += word.getCopyText();
|
|
||||||
// first = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// this->searchText = _content;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// return this->searchText;
|
|
||||||
|
|
||||||
static QString xd;
|
|
||||||
|
|
||||||
return xd;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Highlight
|
// Highlight
|
||||||
@@ -106,6 +89,7 @@ MessagePtr Message::createSystemMessage(const QString &text)
|
|||||||
message->addElement(new TimestampElement(QTime::currentTime()));
|
message->addElement(new TimestampElement(QTime::currentTime()));
|
||||||
message->addElement(new TextElement(text, MessageElement::Text, MessageColor::System));
|
message->addElement(new TextElement(text, MessageElement::Text, MessageColor::System));
|
||||||
message->addFlags(Message::System);
|
message->addFlags(Message::System);
|
||||||
|
message->setSearchText(text);
|
||||||
|
|
||||||
return MessagePtr(message);
|
return MessagePtr(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ public:
|
|||||||
|
|
||||||
// Searching
|
// Searching
|
||||||
const QString &getSearchText() const;
|
const QString &getSearchText() const;
|
||||||
|
void setSearchText(const QString &value);
|
||||||
|
|
||||||
// Scrollbar
|
// Scrollbar
|
||||||
widgets::ScrollbarHighlight getScrollBarHighlight() const;
|
widgets::ScrollbarHighlight getScrollBarHighlight() const;
|
||||||
|
|||||||
@@ -188,6 +188,8 @@ MessagePtr TwitchMessageBuilder::parse()
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->message->setSearchText(this->userName + ": " + this->originalMessage);
|
||||||
|
|
||||||
return this->getMessage();
|
return this->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user