diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-12-18 08:55:18 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-04-17 15:26:54 +0000 |
commit | 65314b6ce88cdbb28a22be0cab9856ec9bc9604b (patch) | |
tree | 6f9e794face29ede4b7501027af20a2fb37f2e4c /src/gui/text/text.pri | |
parent | 860bf13dbd2e9ad0a87b75defcab2cc3c9c771f3 (diff) |
Add QTextMarkdownImporter
This provides the ability to read from a Markdown string or file into
a QTextDocument, such that the formatting will be recognized and can be
rendered.
- Add QTextDocument::setMarkdown(QString)
- Add QTextEdit::setMarkdown(QString)
- Add TextFormat::MarkdownText
- QWidgetTextControl::setContent() calls QTextDocument::setMarkdown()
if that's the format
Fixes: QTBUG-72349
Change-Id: Ief2ad71bf840666c64145d58e9ca71d05fad5659
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/text/text.pri')
-rw-r--r-- | src/gui/text/text.pri | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index abe20abe02..b35a231747 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -97,6 +97,18 @@ qtConfig(textodfwriter) { text/qzip.cpp } +qtConfig(textmarkdownreader) { + qtConfig(system-textmarkdownreader) { + QMAKE_USE += libmd4c + } else { + include($$PWD/../../3rdparty/md4c.pri) + } + HEADERS += \ + text/qtextmarkdownimporter_p.h + SOURCES += \ + text/qtextmarkdownimporter.cpp +} + qtConfig(cssparser) { HEADERS += \ text/qcssparser_p.h |