Giter Site home page Giter Site logo

agateau / doxyqml Goto Github PK

View Code? Open in Web Editor NEW
64.0 12.0 24.0 200 KB

Doxyqml turns .qml into pseudo-C++ which Doxygen can then use to generate documentation.

License: BSD 2-Clause "Simplified" License

Python 74.77% C++ 8.18% QML 16.24% Shell 0.81%
doxygen qml python

doxyqml's Introduction

doxyqml's People

Contributors

agateau avatar cedriccabessa avatar gck-ableton avatar hasselmm avatar mlam19 avatar mpaperno avatar nielsmadan avatar nocnokneo avatar ochurlaud avatar smjoshiatglobus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doxyqml's Issues

pip install fails with python3

It fails with the error below: I think the pip version is outdated, as I didn't find this code in your github version. I cannot fully test kapidox on my laptop, which is unfortunate :S

Thx

Collecting doxyqml
  Using cached doxyqml-0.2.0.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-5e4hrrqj/doxyqml/setup.py", line 6, in <module>
        from doxyqml import doxyqml
      File "/tmp/pip-build-5e4hrrqj/doxyqml/doxyqml/doxyqml.py", line 63
        except LexerError, exc:
                         ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5e4hrrqj/doxyqml/

Add support for QML enums.

QML supports the declaration of custom enum types (I think since 5.12). They are used as follows and should appear as enums in the generated cpp class:

//! brief description for the whole enum
enum TextMode {
	Dynamic,  //!< brief description for the enum values
	Static,  //!< brief description for the enum values
	Cancel  //!< brief description for the enum valuescheck
}

QML file documentation generation skipped if part of qmldir

Hi Aurélien, another bug report from my part...

I added some of my QML files to the qmldir file in the same directory so that I can use "import Components.Ui.Controls 1.0". Now doxygen complains with

Preprocessing D:/tmp/nextgenui-ak/final/components/Ui/Controls/FpsMonitor.qml...
Traceback (most recent call last):
File "D:\apps\doxyqml-wip-skip-directory-imports\doxyqml\doxyqml.py", line 155, in
sys.exit(main())
File "D:\apps\doxyqml-wip-skip-directory-imports\doxyqml\doxyqml.py", line 135, in main
classname, classversion = find_classname(name)
File "D:\apps\doxyqml-wip-skip-directory-imports\doxyqml\doxyqml.py", line 103, in find_classname
if os.path.isfile(filename) and os.path.samefile(qml_file, filename):
AttributeError: 'module' object has no attribute 'samefile'
Parsing file D:/tmp/nextgenui-ak/final/components/Ui/Controls/FpsMonitor.qml...

and no documentation is generated for the "FpsMonitor" QML component.

components/Ui/Controls/qmldir contains:
module Components.Ui.Controls
FpsMonitor 1.0 FpsMonitor.qml

Many thanks,
Andreas

\cond \endcond pair don't work

Using a construct like so:

import QtQuick 2.0

Item {
    /// \cond
    property QtObject priv
    /// \endcond
}

Results in doxygen complaining:

warning: Conditional section does not have a corresponding \endcond command within this file.

And indeed doxyqml strips the \endcond part:

⟫ doxyqml --debug /home/michal/dev/canonical/unity8/repo/qml/Dash/CardTool.qml
              import import QtQuick 2.0
             element Item
         block_start {
             comment /// \cond
             keyword property
             element QtObject
             element priv
             comment /// \endcond
           block_end }
class CardTool : public Item {
public:
/// \cond
Q_PROPERTY(QtObject priv)
};

Add support for nested JavaScript-Code documentation

When i use QML code i would like to have doxygen documentation for nested JavaScript code, too. Considder this example:

Component {
    id: myId

    /** This doxyqml comment will be found by doxyqml */
    property var someProperty

    /** 
     * @brief outputs "test" in console, this is not detected by doxyqml?
     */
    function myJavaScriptFunction() {
        console.log("test");
    }
}

Maybe i do not understand some thing right or i missed something in the doxygen configuration. Thank you for doxyqml :)

No documentation for Singleton component with import ".".

doxyqml does not generate documentation for a singleton qml component if it contains import ".":

Example:

pragma Singleton
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtQuick.Controls.Styles 1.0
import "." // if you remove this line, documentation will be generated for this component

QtObject {
property string hello: "world"
}

Default function arguments fail to parse

A function with a default argument fails to parse:

ERROR:root:Failed to parse /home/jpontaoski/kde/src/kirigami/src/controls/templates/SwipeListItem.qml
ERROR:root:Lexer error line 417: Unexpected token: Token(type='char', value='=', idx=15207)

            function updateVisibleActions(definitelyVisible = false) {
------------------------------------------------------------^

This was supposedly fixed with #53; but it doesn't work as expected.

type specifier does not work with namespace types

If using the type like this:

/** type:MyNamespace::MyType The stuff */
property alias stuff: someObject.stuff

The generated documentation will be wrong. It shows only MyNamespace as the type and the brief description instead reads ::MyType The stuff.

This becomes relevant if a namespaced C++ class is registered in QML and used within QML. For my case, the example is a class named QtAutoUpdater::Updater, which is registered in QML as de.skycoder42.QtAutoUpdater.Core.Updater and used as follows:

/** type:QtAutoUpdater::Updater The updater */
property Updater updater: null

Not adding "type" will set the type to Updater, which is not found by doxygen, as the namespace prefix is missing, and because the Updater class lives in a different namespace than the QML class.

EDIT: This also applies when trying to reference Qt QML classes directly, i.e. QtQuick.Item

doxyqml not working if using --prefix during setup

doxyqml (0.3.0) is not working if installed to a "--prefix" directory, for eample:

python3 setup.py install --prefix=$HOME/opt/doxyqml

~/opt/doxyqml/bin$ ./doxyqml :

Traceback (most recent call last):
File "./doxyqml", line 9, in
from doxyqml import doxyqml
ImportError: No module named doxyqml

My solution was to put
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../lib/python3.2/site-packages")
before the line
from doxyqml import doxyqml
in $HOME/opt/doxyqml/bin/doxyqml

pip install fails

If I try to install it via pip, I get the following error (pyhton 3.5.1)

R:\>pip install doxyqml
Collecting doxyqml
  Using cached doxyqml-0.2.0.tar.bz2
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "C:\Users\Felix\AppData\Local\Temp\pip-build-96moyp0x\doxyqml\setup.py", line 6, in <module>
        from doxyqml import doxyqml
      File "C:\Users\Felix\AppData\Local\Temp\pip-build-96moyp0x\doxyqml\doxyqml\doxyqml.py", line 63
        except LexerError, exc:
                         ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Felix\AppData\Local\Temp\pip-build-96moyp0x\doxyqml

It doesn't work on Windows 7.

Hi,

I installed Python3.3, the doxyqml installation failed with syntax error.

Then I change to Python2.7, the doxyqml installation ok.

But after execute doxygen with my qml files, there is nothing appeared after open index.html.

What should I do to solve the problem?

Thanks,

Cid

White space before import doesn't work

I could reproduce the problem in the unit tests by inserting a space before import. Error message is as follows `ERROR:root:Failed to parse RelativeImport.qml
ERROR:root:Lexer error line 3: Expected '{' after base class name

import QtQuick.Controls.Styles 1.0
--------^
relative-import: ERROR: doxyqml failed on RelativeImport.qml`

doxyqml error

My doxygen write File "C:\Python36\build\lib\doxyqml\doxyqml.py", line 9, in
from . import qmlparser ImportError: cannot import name 'qmlparser
is any solution?

convert output of doxyqml to qch and use it with F1 in QtCreator

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?

Doc generated for TestCase

Hi,
I want to use doxyqml to generate code about my test case, but it seems that doxyqml doesn't convert it, or doxygen doesn't work on the converted test case.

I got a file like :

Item{
/**
* @Property myVar
*/
property bool myVar

/**
* @property TestCase*
*/
TestCase{
	/**
	* @property myFunc*
	*/
	myFunc{}
}

}

but after the run of doxygen with doxyqml, i only get doc for myVar.
Is it normal, did i don't use doxyqml correctly or it isn't implemented?

I use import QtTest 1.2 for my testCase.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.