QTfrontend/ui/widget/chatwidget.cpp
changeset 6193 4f234aa06182
parent 6182 d56d18802481
child 6194 32b7e0ece99a
equal deleted inserted replaced
6192:7c34bf4fbb54 6193:4f234aa06182
   464         default:
   464         default:
   465             if (isFriend)
   465             if (isFriend)
   466                 cssClass = "msg_FriendChat";
   466                 cssClass = "msg_FriendChat";
   467     }
   467     }
   468 
   468 
   469     addLine(cssClass, formattedStr, (!nick.isEmpty()) && str.contains(m_userNick));
   469     bool isHL = (!nick.isEmpty() &&
       
   470                 (nick != m_userNick) &&
       
   471                 str.toLower().contains(
       
   472                         QRegExp(QString("^(.* )?%1(( |: ).*)?$").
       
   473                             arg(QRegExp::escape(m_userNick).toLower())))
       
   474                 );
       
   475 
       
   476     addLine(cssClass, formattedStr, isHL);
   470 }
   477 }
   471 
   478 
   472 void HWChatWidget::addLine(const QString & cssClass, QString line, bool isHighlight)
   479 void HWChatWidget::addLine(const QString & cssClass, QString line, bool isHighlight)
   473 {
   480 {
   474     if (s_displayNone->contains(cssClass))
   481     if (s_displayNone->contains(cssClass))