mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-06 13:46:11 -05:00
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:
parent
1027621e07
commit
b245ad7cf7
@ -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();
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user