summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-11-27 16:31:54 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-03 12:49:47 +0000
commitb2ebc2268c1a4093b0771c92e53732a1ad332f1c (patch)
tree6687ac6470717deafeec1b2d03176e272493e714
parent0cd2935ed9d772f0eb06d03201baabd60764ec80 (diff)
Doc: Make \youtube macro work with litehtml help backend
Unlike the QTextBrowser backend, litehtml does not render elements inside <iframe> correctly. This prevented external links to YouTube from working in offline documentation. Move the <iframe> to a macro override specific to online doc builds. Fixes: QTBUG-88975 Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit ca8e9ff2ef0a01248e3bdd718ef9fc06419214a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--doc/global/macros-online.qdocconf4
-rw-r--r--doc/global/macros.qdocconf4
-rw-r--r--doc/global/qt-module-defaults-online.qdocconf3
3 files changed, 8 insertions, 3 deletions
diff --git a/doc/global/macros-online.qdocconf b/doc/global/macros-online.qdocconf
new file mode 100644
index 0000000000..c6f370a7d7
--- /dev/null
+++ b/doc/global/macros-online.qdocconf
@@ -0,0 +1,4 @@
+macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
+ "<iframe src=\"https://www.youtube.com/embed/\1\"" \
+ "frameborder=\"0\" allowfullscreen>\n" \
+ "</iframe></div>\n"
diff --git a/doc/global/macros.qdocconf b/doc/global/macros.qdocconf
index bad7d12816..9a0ea73cbd 100644
--- a/doc/global/macros.qdocconf
+++ b/doc/global/macros.qdocconf
@@ -57,12 +57,10 @@ macro.QtMinorVersion.match = "\\d+\\.(\\d+)"
# qhp.ProjectName.extraFiles += images/dQw4w9WgXcQ.jpg
#
macro.youtube.HTML = "<div class=\"video\">\n<span class=\"vspan\"></span>\n" \
- "<iframe src=\"https://www.youtube.com/embed/\1\"" \
- "frameborder=\"0\" allowfullscreen>\n" \
"<a href=\"https://www.youtube.com/watch/?v=\1\">\n"\
"<img src=\"images/\1.jpg\"" \
"title=\"Click to play in a browser\" /></a>\n" \
- "</iframe></div>\n"
+ "</div>\n"
macro.excludefromcreator = "\\meta tag broken"
diff --git a/doc/global/qt-module-defaults-online.qdocconf b/doc/global/qt-module-defaults-online.qdocconf
index 20453a7506..7a956610b0 100644
--- a/doc/global/qt-module-defaults-online.qdocconf
+++ b/doc/global/qt-module-defaults-online.qdocconf
@@ -23,6 +23,9 @@ include(manifest-meta.qdocconf)
include(fileextensions.qdocconf)
include(qt-html-templates-online.qdocconf)
+#override macros for online use
+include(macros-online.qdocconf)
+
#extra configuration data DITA information
include(config.qdocconf)