Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #50 from JohannesSchilling/no-since-version
Browse files Browse the repository at this point in the history
Add option to not generate "Since: [ver]" in docs
  • Loading branch information
agateau committed Apr 28, 2019
2 parents 2d7d0a2 + 7ae54ae commit 6481a72
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doxyqml/main.py
Expand Up @@ -50,6 +50,10 @@ def parse_args(argv):
action='append',
default=[],
help="Wrap the generated C++ classes in NAMESPACE")
parser.add_argument("--no-since-version",
action="store_true",
default=False,
help="Don't append \"Since: [version]\" info to docstring")
parser.add_argument('--version',
action='version',
version='%%(prog)s %s' % __version__)
Expand Down Expand Up @@ -145,6 +149,9 @@ def main(argv=None, out=None):
print("%20s %s" % (token.type, token.value))

classname, classversion = find_classname(name, namespace)
if args.no_since_version:
classversion = None

qml_class = QmlClass(classname, classversion)

try:
Expand Down
1 change: 1 addition & 0 deletions tests/functional/no-since-version/args.json
@@ -0,0 +1 @@
["--no-since-version"]
@@ -0,0 +1,9 @@
namespace test::doxyqml {
class QualifiedName : public Item {
public:

Q_PROPERTY(int x)

Q_PROPERTY(int y)
};
}
4 changes: 4 additions & 0 deletions tests/functional/no-since-version/input/QualifiedName.qml
@@ -0,0 +1,4 @@
Item {
property int x
property int y
}
2 changes: 2 additions & 0 deletions tests/functional/no-since-version/input/qmldir
@@ -0,0 +1,2 @@
module test.doxyqml
QualifiedName 2.0 QualifiedName.qml

0 comments on commit 6481a72

Please sign in to comment.