From 0eb26c144346dcb12008e5b3e9441073f09668a8 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Sun, 19 May 2019 13:06:05 +0200 Subject: 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 --- tests/auto/widgets/widgets/qtextbrowser/markdown.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/widgets/widgets/qtextbrowser/markdown.md (limited to 'tests/auto/widgets/widgets/qtextbrowser/markdown.md') diff --git a/tests/auto/widgets/widgets/qtextbrowser/markdown.md b/tests/auto/widgets/widgets/qtextbrowser/markdown.md new file mode 100644 index 0000000000..be56aef234 --- /dev/null +++ b/tests/auto/widgets/widgets/qtextbrowser/markdown.md @@ -0,0 +1,2 @@ +### this is a heading +this is a paragraph -- cgit v1.2.3