QTfrontend/ui/widget/chatwidget.cpp
branch0.9.18
changeset 7911 98b806c1793d
parent 7743 dc41e9222d2c
child 8049 133e22b5c410
equal deleted inserted replaced
7910:2cd9bcca0d9d 7911:98b806c1793d
   530     m_highlights.clear();
   530     m_highlights.clear();
   531 
   531 
   532     QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$");
   532     QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$");
   533     QRegExp whitespace("\\s");
   533     QRegExp whitespace("\\s");
   534 
   534 
   535     m_highlights.append(QRegExp(hlRegExp.arg(m_userNick)));
   535     m_highlights.append(QRegExp(hlRegExp.arg(m_userNick.toLower())));
   536 
   536 
   537     QFile file(cfgdir->absolutePath() + "/" + m_userNick + "_highlight.txt");
   537     QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt");
   538 
   538 
   539     if (file.exists() && (file.open(QIODevice::ReadOnly | QIODevice::Text)))
   539     if (file.exists() && (file.open(QIODevice::ReadOnly | QIODevice::Text)))
   540     {
   540     {
   541         QTextStream in(&file);
   541         QTextStream in(&file);
   542         while (!in.atEnd())
   542         while (!in.atEnd())
   552 
   552 
   553         if (file.isOpen())
   553         if (file.isOpen())
   554             file.close();
   554             file.close();
   555     }
   555     }
   556 
   556 
   557     QFile file2(cfgdir->absolutePath() + "/" + m_userNick + "_hlregexp.txt");
   557     QFile file2(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_hlregexp.txt");
   558 
   558 
   559     if (file2.exists() && (file2.open(QIODevice::ReadOnly | QIODevice::Text)))
   559     if (file2.exists() && (file2.open(QIODevice::ReadOnly | QIODevice::Text)))
   560     {
   560     {
   561         QTextStream in(&file2);
   561         QTextStream in(&file2);
   562         while (!in.atEnd())
   562         while (!in.atEnd())