mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Simplify regex
This commit is contained in:
parent
34b9236d58
commit
908dafd3b8
|
@ -641,7 +641,7 @@ void Widget::setUsername(const QString& username)
|
|||
{
|
||||
ui->nameLabel->setText(username);
|
||||
ui->nameLabel->setToolTip(username); // for overlength names
|
||||
nameMention = QRegExp("([^a-z]|^)" + QRegExp::escape(username) + "([^a-z]|$)", Qt::CaseInsensitive);
|
||||
nameMention = QRegExp("\\b" + QRegExp::escape(username) + "\\b", Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
void Widget::onStatusMessageChanged(const QString& newStatusMessage, const QString& oldStatusMessage)
|
||||
|
|
Loading…
Reference in New Issue
Block a user