I saw that the LLVM documentation at http://llvm.org/doxygen/ is generated by doxygen. This is very cool because with just a few additional settings one could get a Qt Compressed Help (QCH) file. After applying my patch, you can configure LLVM using CMake with these defines (the generator isn't really important):
cmake -G Ninja ../llvm \ -DLLVM_ENABLE_DOXYGEN=ON \ -DLLVM_ENABLE_DOXYGEN_QT_HELP=ON
Prerequisites
You need to have the "qhelpgenerator" binary installed for this to work. On my system this is provided by these packages:
qt4-dev-tools qttools5-dev-tools
Other QCH configuration variables
There are more CMake configurations you can specify, please see the docs/CMake.rst for documentation on them.
Note, that the default behaviour for generating the documentation for LLVM is not changed by my commit.
Building the Qt compressed help file
Then build the doxygen documentation as well as the QCH file:
ninja doxygen-llvm
This will build the generation of the a file called "org.llvm.qch". This QCH file can then be used in Qt Creator for direct documentation lookup of LLVM symbols. It will be located in your build directory under
docs/doxygen/html/org.llvm.qch
After importing this into the help system of Qt Creator you can hover your cursor over a symbol like llvm::APFloat and press <F1>, this will instantly bring up the documentation for this class in a documentation pane to the right of your editing window.
The downside of this documentation file is that it is really big in size, since it basically contains all of the HTML files generated by doxygen. But for a single developer's machine, this is okay, I guess.
Troubleshooting
If you you don't find "org.llvm.qch" after building the documentation, chances are that you ran into a known problem with doxgen. To circumvent it, navigate to docs/doxygen/html in your your build directory.
There's an intermediate Qt Help Project file called "index.qhp" which most likely contains a broken XML code. To fix this, run this command manually
qhelpgenerator -o org.llvm.qch index.qhp
If it prints something like this:
Error in line 97929: Opening and ending tag mismatch.
Open the file at the given position and simply remove the </section> tag infront of the </toc> tag. Then rerun qhelpgenerator -o org.llvm.qch index.qhp. It should print something like this:
Building up file structure... Insert custom filters... Insert help data for filter section (1 of 1)... Insert files... Insert contents... Insert indices... Documentation successfully generated.
By now you should have your Qt Compressed Help file!
Other projects having Qt Compressed Help files
This website lists Qt Compressed Help files for other projects:
http://qt-project.org/wiki/Qt_Creator_Documentation_Gallery
I hope that somebody finds this patch useful.
Regards,
Konrad