[Cmake-commits] CMake branch, next, updated. v3.0.0-rc3-1730-ge723f9f

Stephen Kelly steveire at gmail.com
Tue Apr 1 13:46:11 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  e723f9fa74939b37b11fc05756dae8ee8976bb31 (commit)
       via  3a572290cc606039bae210309eefe82cfde85e54 (commit)
      from  f83a50e31dd56adf22d749edc5580df060afdf90 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e723f9fa74939b37b11fc05756dae8ee8976bb31
commit e723f9fa74939b37b11fc05756dae8ee8976bb31
Merge: f83a50e 3a57229
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Apr 1 13:46:10 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 1 13:46:10 2014 -0400

    Merge topic 'workaround-qt4-assistant' into next
    
    3a572290 Help: Workaround Qt 4.8 assistant bug in CSS handling.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a572290cc606039bae210309eefe82cfde85e54
commit 3a572290cc606039bae210309eefe82cfde85e54
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Apr 1 19:04:28 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Apr 1 19:45:08 2014 +0200

    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.

diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 51c83ba..4ae4bec 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -75,6 +75,10 @@ if(SPHINX_QTHELP)
   list(APPEND doc_formats qthelp)
 
   set(qthelp_extra_commands
+    # Workaround for assistant prior to
+    # https://codereview.qt-project.org/#change,82250 in Qt 4.
+    COMMAND ${CMAKE_COMMAND} "-DCSS_DIR=${CMAKE_CURRENT_BINARY_DIR}/qthelp/_static"
+      -P "${CMAKE_CURRENT_SOURCE_DIR}/apply_qthelp_css_workaround.cmake"
     COMMAND qcollectiongenerator ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qhcp
   )
 endif()
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}")

-----------------------------------------------------------------------

Summary of changes:
 Utilities/Sphinx/CMakeLists.txt                    |    4 ++++
 Utilities/Sphinx/apply_qthelp_css_workaround.cmake |   15 +++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 Utilities/Sphinx/apply_qthelp_css_workaround.cmake


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list