Messages with plain text (like the welcome message) are shown correctly.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4080 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-03-06 12:58:18 +00:00
parent 1027621e07
commit b245ad7cf7
2 changed files with 27 additions and 27 deletions

View File

@ -509,16 +509,10 @@ void p3MsgService::loadWelcomeMsg()
msg -> subject = L"Welcome to Retroshare";
msg -> message = L"Send and receive messages\n";
msg -> message += L"with your friends...\n\n";
msg -> message += L"These can hold recommendations\n";
msg -> message += L"from your local shared files\n\n";
msg -> message += L"Add recommendations through\n";
msg -> message += L"the Local Files Dialog\n\n";
msg -> message += L"Enjoy.\n";
msg -> message = L"Send and receive messages with your friends...\n";
msg -> message += L"These can hold recommendations from your local shared files.\n\n";
msg -> message += L"Add recommendations through the Local Files Dialog.\n\n";
msg -> message += L"Enjoy.";
msg -> msgId = getNewUniqueMsgId();

View File

@ -19,6 +19,7 @@
* Boston, MA 02110-1301, USA.
****************************************************************/
#include <QTextBrowser>
#include "HandleRichText.h"
@ -49,7 +50,12 @@ QString formatText(const QString &text, unsigned int flag)
}
QDomDocument doc;
doc.setContent(text);
if (doc.setContent(text) == false) {
// convert text with QTextBrowser
QTextBrowser textBrowser;
textBrowser.setText(text);
doc.setContent(textBrowser.toHtml());
}
QDomElement body = doc.documentElement();
if (flag & RSHTML_FORMATTEXT_EMBED_SMILEYS) {