[qet] [3018] Update richtexteditor

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 3018
Author:   scorpio810
Date:     2014-04-22 11:54:22 +0200 (Tue, 22 Apr 2014)
Log Message:
-----------
Update richtexteditor

Modified Paths:
--------------
    trunk/sources/richtext/richtexteditor.cpp

Modified: trunk/sources/richtext/richtexteditor.cpp
===================================================================
--- trunk/sources/richtext/richtexteditor.cpp	2014-04-22 06:33:00 UTC (rev 3017)
+++ trunk/sources/richtext/richtexteditor.cpp	2014-04-22 09:54:22 UTC (rev 3018)
@@ -827,6 +827,9 @@
 
 void RichTextEditorDialog::setText(const QString &text)
 {
+    // Generally simplify rich text unless verbose text is found.
+    const bool isSimplifiedRichText = !text.startsWith("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\";>");
+    m_editor->setSimplifyRichText(isSimplifiedRichText);
     m_editor->setText(text);
     m_text_edit->setPlainText(text);
     m_state = Clean;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/