convert output of doxyqml to qch and use it with F1 in QtCreator
[Imported from GitHub]
- GitHub id: 56
- Author: vdaele
- Created at: 2020-08-25 14:58:25+00:00
As described here I can ask doxygen to generate a qhp/qhc file and import this qhc file in QtCreator. This shows the documentation when pressing F1. This works fine for C++ components.
Unfortunately, when trying the same for a QML file foo, this seems to fail. The HTML files for the QML component are generated, the qml components are in the generated index.qhp but , after importing the qch file in QtCreator, QtCreator still complains that it can't find documentation for QML.foo
I tried using FILTER_PATTERNS = *.qml="doxyqml --namespace=QML" but this didn't work either
Any ideas?
Comments
from vdaele, 2020-08-26 07:48:48+00:00
I noticed that the the qhp file generated by qdoc contains something like
<keyword name="AboutView" id="QML.AboutView" ref="qml-aboutview.html"/>
while the qhp file generated by doxygen contains (when using doxyqml --namespace=QML) contains
<keyword name="QML::AboutView" id="QML::AboutView" ref="classQML_1_1AboutView.html" />
When I replace the id="QML::AboutView"
with id="QML.AboutView"
and run qhelpgenerator
myself to convert the qhp file to qhc, things works fine.
So as a temporary workaround, I now run doygen/doxyqml and do a postprocessing using sed
to replace all QML::
with QML.
in the keyword
XML fragments.
from agateau, 2020-09-02 06:48:55+00:00
Hi, sorry for the late reply.
It looks like the issue is that Doxygen generates qhp files with C++ in mind (hence the ::
between the namespace and the class name) whereas qdoc uses a different syntax for QML identifiers.
Doxyqml does not have any control over the generated code, it just turns QML into pseudo-C++, which Doxygen parses, so the way the qhp is generated is out of Doxyqml reach. It looks like your best bet for now is to continue applying the postprocessing you setup to replace QML::
with QML.
.
from vdaele, 2020-09-02 10:10:57+00:00
Thank you for your feedback.
My initial thought was to add a "--prefix=QML." option to doxyqml that would be prepended to the class name but unfortunately, a 'dot' is not allowed in a C++ classname so that wouldn't work I guess.
from agateau, 2020-09-13 15:16:48+00:00
Yes, I think that won't work unfortunately.