Browse Source

chatmessage.cpp: detectQuotes() simplify conditional statement

pull/1718/head
Ansa89 10 years ago
parent
commit
264732bf10
  1. 6
      src/chatlog/chatmessage.cpp

6
src/chatlog/chatmessage.cpp

@ -212,11 +212,9 @@ QString ChatMessage::detectQuotes(const QString& str, MessageType type)
// quotes and action messages possible, since only first line can cause // quotes and action messages possible, since only first line can cause
// problems in case where there is quote in it used. // problems in case where there is quote in it used.
if (QRegExp("^(>|>)( |[[]|>|[^_\\d\\W]).*").exactMatch(messageLines[i])) { if (QRegExp("^(>|>)( |[[]|>|[^_\\d\\W]).*").exactMatch(messageLines[i])) {
if (type != ACTION) if (i > 0 || type != ACTION)
quotedText += "<span class=quote>" + messageLines[i] + "</span>"; quotedText += "<span class=quote>" + messageLines[i] + "</span>";
else if (type == ACTION && i > 0) else
quotedText += "<span class=quote>" + messageLines[i] + "</span>";
else if (type == ACTION && i == 0)
quotedText += messageLines[i]; quotedText += messageLines[i];
} else { } else {
quotedText += messageLines[i]; quotedText += messageLines[i];

Loading…
Cancel
Save