equal
deleted
inserted
replaced
542 m_highlights.clear(); |
542 m_highlights.clear(); |
543 |
543 |
544 QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$"); |
544 QString hlRegExp("^(.* )?%1[^-a-z0-9_]*( .*)?$"); |
545 QRegExp whitespace("\\s"); |
545 QRegExp whitespace("\\s"); |
546 |
546 |
547 m_highlights.append(QRegExp(hlRegExp.arg(m_userNick.toLower()))); |
547 if (!m_userNick.isEmpty()) |
|
548 m_highlights.append(QRegExp(hlRegExp.arg(QRegExp::escape(m_userNick.toLower())))); |
548 |
549 |
549 QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt"); |
550 QFile file(cfgdir->absolutePath() + "/" + m_userNick.toLower() + "_highlight.txt"); |
550 |
551 |
551 if (file.exists() && (file.open(QIODevice::ReadOnly | QIODevice::Text))) |
552 if (file.exists() && (file.open(QIODevice::ReadOnly | QIODevice::Text))) |
552 { |
553 { |