diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-19 13:06:05 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2019-05-30 16:37:23 +0000 |
commit | 0eb26c144346dcb12008e5b3e9441073f09668a8 (patch) | |
tree | 4134706a0eba2a22312ef2eb8350a28231c5c936 /src/gui/text/qtextdocument.cpp | |
parent | a5b373e0db45a28c133bf413e00f15271aa20200 (diff) |
QTextBrowser: detect and load markdown rather than assuming HTML
So we add the QTextDocument::ResourceType::MarkdownResource enum value to indicate
the type. QMimeDatabase is generally unable to detect markdown by "magic", so we
need to use the common file extensions to detect it (the same extensions as declared
in the mime database XML).
Change-Id: Ib71f03abd535c17e5a8c99bd92d0a6062e972837
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/gui/text/qtextdocument.cpp')
-rw-r--r-- | src/gui/text/qtextdocument.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 3266819bf3..c800cea3f6 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2076,6 +2076,7 @@ void QTextDocument::print(QPagedPaintDevice *printer) const The icon needs to be converted to one of the supported types first, for example using QIcon::pixmap. \value StyleSheetResource The resource contains CSS. + \value MarkdownResource The resource contains Markdown. \value UserResource The first available value for user defined resource types. |