diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-04-01 17:04:28 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-01 17:45:08 (GMT) |
commit | 3a572290cc606039bae210309eefe82cfde85e54 (patch) | |
tree | 6230f7f402dfc448100c0a65d1f723887ec20455 /Utilities/Sphinx/apply_qthelp_css_workaround.cmake | |
parent | 358be9b3207ad92a7ce4a5744db6a7265d8a0844 (diff) | |
download | CMake-3a572290cc606039bae210309eefe82cfde85e54.zip CMake-3a572290cc606039bae210309eefe82cfde85e54.tar.gz CMake-3a572290cc606039bae210309eefe82cfde85e54.tar.bz2 |
Help: Workaround Qt 4.8 assistant bug in CSS handling.
Assistant in Qt 4.8 does not handle css import paths relative to
the includer. This is fixed in Qt 4.8 commit b95750a275 (Assistant: Set
the url on created QNetworkReply objects., 2014-03-31). It is unknown
whether there will be a further Qt 4.8 release containing that commit.
Use a CMake script to pre-replace the content prior to generating the
qch file. An alternative workaround of moving the files or adding
"_static" to the import path did not seem to work for existing Qt 4.8
versions.
The bug was fixed in the Qt 5 branch before Qt 5.0. The Qt 5 assistant
renders this workaround'ed version correctly too.
Diffstat (limited to 'Utilities/Sphinx/apply_qthelp_css_workaround.cmake')
-rw-r--r-- | Utilities/Sphinx/apply_qthelp_css_workaround.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Utilities/Sphinx/apply_qthelp_css_workaround.cmake b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake new file mode 100644 index 0000000..8b74d12 --- /dev/null +++ b/Utilities/Sphinx/apply_qthelp_css_workaround.cmake @@ -0,0 +1,15 @@ + +file(READ "${CSS_DIR}/basic.css" BasicCssContent) + +file(READ "${CSS_DIR}/default.css" DefaultCssContent) +string(REPLACE + "@import url(\"basic.css\")" "${BasicCssContent}" + DefaultCssContent "${DefaultCssContent}" +) + +file(READ "${CSS_DIR}/cmake.css" CMakeCssContent) +string(REPLACE + "@import url(\"default.css\")" "${DefaultCssContent}" + CMakeCssContent "${CMakeCssContent}" +) +file(WRITE "${CSS_DIR}/cmake.css" "${CMakeCssContent}") |