[Cmake-commits] CMake branch, next, updated. v3.0.0-3779-g84a8d51

Stephen Kelly steveire at gmail.com
Tue Jun 17 05:29:36 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  84a8d51fc9dad5e504ccada5bd1160aba24bce59 (commit)
       via  d107949d213e53521a04f9c29362ca618bbbf8ae (commit)
       via  b5002631c0fedc5ae747fc0450fb4285f977b512 (commit)
      from  bd28f78ffcbcf3a47055c314acf0f71e41f740fc (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=84a8d51fc9dad5e504ccada5bd1160aba24bce59
commit 84a8d51fc9dad5e504ccada5bd1160aba24bce59
Merge: bd28f78 d107949
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 17 05:29:35 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jun 17 05:29:35 2014 -0400

    Merge topic 'qthelp-context-fixes' into next
    
    d107949d Help: Add context to titles in QtHelp.
    b5002631 Help: Create proper identifiers for keywords in QtHelp.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d107949d213e53521a04f9c29362ca618bbbf8ae
commit d107949d213e53521a04f9c29362ca618bbbf8ae
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Jun 17 11:26:44 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jun 17 11:28:00 2014 +0200

    Help: Add context to titles in QtHelp.
    
    This allows disambiguation of identifiers in Qt Assistant and Creator.

diff --git a/Utilities/Sphinx/templates/layout.html b/Utilities/Sphinx/templates/layout.html
index 635ace3..1c5728c 100644
--- a/Utilities/Sphinx/templates/layout.html
+++ b/Utilities/Sphinx/templates/layout.html
@@ -11,3 +11,9 @@
     <a href="{{ pathto(master_doc) }}">{{ shorttitle|e }}</a>{{ reldelim1 }}
   </li>
 {% endblock %}
+
+{# Put some context in the html title element. Workaround for #}
+{# https://bitbucket.org/birkenfeld/sphinx/issue/1492/qthelp-generate-html-title-element-should #}
+{% block htmltitle %}
+  <title>{{ title|striptags|e }} {{ "—"|safe }} {{ docstitle|e }}</title>
+{% endblock %}

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b5002631c0fedc5ae747fc0450fb4285f977b512
commit b5002631c0fedc5ae747fc0450fb4285f977b512
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jun 13 15:27:59 2014 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Tue Jun 17 11:06:48 2014 +0200

    Help: Create proper identifiers for keywords in QtHelp.
    
    This is necessary in order for the QHelpEngineCore::linksForIdentifier API
    to work.
    
     http://doc-snapshot.qt-project.org/qt5-5.3/qhelpenginecore.html#linksForIdentifier
    
    That API is used by QtCreator to enable contextual links to help files.

diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt
index 951f7ab..fd8cda9 100644
--- a/Utilities/Sphinx/CMakeLists.txt
+++ b/Utilities/Sphinx/CMakeLists.txt
@@ -88,6 +88,11 @@ if(SPHINX_QTHELP)
     COMMAND ${CMAKE_COMMAND} "-DQTHELP_DIR=${CMAKE_CURRENT_BINARY_DIR}/qthelp/"
       "-DCMake_VERSION=${CMake_VERSION_MAJOR}${CMake_VERSION_MINOR}${CMake_VERSION_PATCH}"
       -P "${CMAKE_CURRENT_SOURCE_DIR}/fixup_qthelp_names.cmake"
+
+    # Create proper identifiers. Workaround for
+    # https://bitbucket.org/birkenfeld/sphinx/issue/1491/qthelp-should-generate-identifiers-for
+    COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/create_identifiers.py" "${CMAKE_CURRENT_BINARY_DIR}/qthelp/"
+
     COMMAND qcollectiongenerator ${CMAKE_CURRENT_BINARY_DIR}/qthelp/CMake.qhcp
   )
 endif()
diff --git a/Utilities/Sphinx/create_identifiers.py b/Utilities/Sphinx/create_identifiers.py
new file mode 100755
index 0000000..4db7a3f
--- /dev/null
+++ b/Utilities/Sphinx/create_identifiers.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import sys, os
+
+if len(sys.argv) != 2:
+  sys.exit(-1)
+name = sys.argv[1] + "/CMake.qhp"
+
+f = open(name)
+
+if not f:
+  sys.exit(-1)
+
+lines = f.read().splitlines()
+
+if not lines:
+  sys.exit(-1)
+
+newlines = []
+
+for line in lines:
+  if "<keyword name=\"command\"" in line:
+    if not "id=\"" in line:
+      prefix = "<keyword name=\"command\" "
+      part1, part2 = line.split(prefix)
+      head, tail = part2.split("#command:")
+      cmdname, rest = tail.split("\"")
+      line = part1 + prefix + "id=\"command/" + cmdname + "\" " + part2
+  newlines.append(line + "\n")
+
+f = open(name, "w")
+f.writelines(newlines)

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

Summary of changes:
 Utilities/Sphinx/CMakeLists.txt        |    5 +++++
 Utilities/Sphinx/create_identifiers.py |   32 ++++++++++++++++++++++++++++++++
 Utilities/Sphinx/templates/layout.html |    6 ++++++
 3 files changed, 43 insertions(+)
 create mode 100755 Utilities/Sphinx/create_identifiers.py


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list