diff options
author | Topi Reinio <topi.reinio@qt.io> | 2020-11-27 16:31:54 +0100 |
---|---|---|
committer | Topi Reiniƶ <topi.reinio@qt.io> | 2020-12-01 08:12:09 +0000 |
commit | ca8e9ff2ef0a01248e3bdd718ef9fc06419214a4 (patch) | |
tree | 8ce6d63b183f29a0547755dd972e18aeb27f2788 | |
parent | 7fd89ed63bad149212c2257c4ca8f344cf4e044f (diff) | |
download | qtbase-ca8e9ff2ef0a01248e3bdd718ef9fc06419214a4.tar.gz |
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.
Pick-to: 6.0 6.0.0
Fixes: QTBUG-88975
Change-Id: Iff7828ddeed353620eaa9ac669a3e0c03749daa2
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | doc/global/macros-online.qdocconf | 4 | ||||
-rw-r--r-- | doc/global/macros.qdocconf | 4 | ||||
-rw-r--r-- | doc/global/qt-module-defaults-online.qdocconf | 3 |
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) |