diff options
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index c1714edb0c..c44e98b77e 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -142,38 +142,6 @@ bool Qt::mightBeRichText(const QString& text) } /*! - Converts the plain text string \a plain to a HTML string with - HTML metacharacters \c{<}, \c{>}, \c{&}, and \c{"} replaced by HTML - entities. - - Example: - - \snippet doc/src/snippets/code/src_gui_text_qtextdocument.cpp 0 - - This function is defined in the \c <QTextDocument> header file. - - \sa convertFromPlainText(), mightBeRichText() -*/ -QString Qt::escape(const QString& plain) -{ - QString rich; - rich.reserve(int(plain.length() * 1.1)); - for (int i = 0; i < plain.length(); ++i) { - if (plain.at(i) == QLatin1Char('<')) - rich += QLatin1String("<"); - else if (plain.at(i) == QLatin1Char('>')) - rich += QLatin1String(">"); - else if (plain.at(i) == QLatin1Char('&')) - rich += QLatin1String("&"); - else if (plain.at(i) == QLatin1Char('"')) - rich += QLatin1String("""); - else - rich += plain.at(i); - } - return rich; -} - -/*! \fn QString Qt::convertFromPlainText(const QString &plain, WhiteSpaceMode mode) Converts the plain text string \a plain to an HTML-formatted @@ -3002,7 +2970,7 @@ void QTextHtmlExporter::emitFrameStyle(const QTextFrameFormat &format, FrameType The \a encoding parameter specifies the value for the charset attribute in the html header. For example if 'utf-8' is specified then the beginning of the generated html will look like this: - \snippet doc/src/snippets/code/src_gui_text_qtextdocument.cpp 1 + \snippet doc/src/snippets/code/src_gui_text_qtextdocument.cpp 0 If no encoding is specified then no such meta information is generated. |