fixed keyword splitting in chat lobby notify system (Patch from Phenom)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8097 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-03-29 14:12:34 +00:00
parent 6b584e9ae9
commit 3f7d41e5bc

View File

@ -82,11 +82,8 @@ void ChatLobbyUserNotify::setTextToNotify(QStringList value)
void ChatLobbyUserNotify::setTextToNotify(QString value) void ChatLobbyUserNotify::setTextToNotify(QString value)
{ {
QRegExp regExp("([ ~!@#$%^&*()_+{}|:\"<>?,./;'[\\]\\\\\\-=\\t\\n\\r])"); //RegExp for End of Word while(value.contains("\n\n")) value.replace("\n\n","\n");
QStringList list = value.split(regExp); QStringList list = value.split("\n");
QString newValue = list.join("\n");
while(newValue.contains("\n\n")) newValue.replace("\n\n","\n");
list = newValue.split("\n");
setTextToNotify(list); setTextToNotify(list);
} }