diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-07 15:56:37 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2017-06-09 13:49:18 +0000 |
commit | a3e4e367cf462e2dd9d7b08fe8d3f0007c33e1fa (patch) | |
tree | a2c8d3fc3719656a18aaf2b3734fc73466efca06 /sources/shiboken2/generator/generator.h | |
parent | 798d3edb8ff260e7a6cf56640121146bc6e62593 (diff) |
shiboken: Further refactor command line arguments and help
Replace the QMap of options returned by the generators by a vector
of pairs to allow for specifying the order. This allows
for better formatting -I/-F/-T in multiple lines.
Add -h for help.
Move the missing typelib file handling into main and print a help hint
there.
Change-Id: I5a95bd8d193be012aaa7ce3934945b25e21d3f79
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/generator/generator.h')
-rw-r--r-- | sources/shiboken2/generator/generator.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/shiboken2/generator/generator.h b/sources/shiboken2/generator/generator.h index 5ff5d6ae5..f0b2a5e41 100644 --- a/sources/shiboken2/generator/generator.h +++ b/sources/shiboken2/generator/generator.h @@ -137,6 +137,9 @@ private: class Generator { public: + typedef QPair<QString, QString> OptionDescription; + typedef QVector<OptionDescription> OptionDescriptions; + /// Optiosn used around the generator code enum Option { NoOption = 0x00000000, @@ -181,7 +184,7 @@ public: bool setup(const ApiExtractor& extractor, const QMap<QString, QString> args); - virtual QMap<QString, QString> options() const; + virtual OptionDescriptions options() const; /// Returns the classes used to generate the binding code. AbstractMetaClassList classes() const; |