mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-04 12:24:24 -04:00
Fix Chat History Browser
This commit is contained in:
parent
0e38f4870f
commit
d78316cbd2
3 changed files with 12 additions and 14 deletions
|
@ -618,13 +618,13 @@ QString RsHtml::formatText(QTextDocument *textDocument, const QString &text, ulo
|
|||
|
||||
QString errorMsg; int errorLine; int errorColumn;
|
||||
|
||||
QDomDocument doc;
|
||||
QDomDocument doc;
|
||||
if (doc.setContent(formattedText, &errorMsg, &errorLine, &errorColumn) == false) {
|
||||
|
||||
// convert text with QTextBrowser
|
||||
QTextBrowser textBrowser;
|
||||
textBrowser.setText(text);
|
||||
formattedText=textBrowser.toHtml();
|
||||
// convert text with QTextDocument
|
||||
QTextDocument textDoc;
|
||||
textDoc.setPlainText(text);
|
||||
formattedText=textDoc.toHtml();
|
||||
formattedText.remove(0,formattedText.indexOf("<"));
|
||||
formattedText=saveSpace(formattedText);
|
||||
doc.setContent(formattedText, &errorMsg, &errorLine, &errorColumn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue