diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-06-27 15:30:24 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-07-16 11:18:32 +0000 |
commit | 269f835a8d21d6ad79e20de675ebb2132255367d (patch) | |
tree | 40ad75a74bb167b3c43d87f2868ba4209c34ee3b /sources/shiboken2/generator/generator.h | |
parent | ce8547b044ac635f2b1f6e7ecd3d100714241b04 (diff) |
shiboken: Refactor command line arguments handling
In main, replace the class ArgsHandler by plain QMap handling.
Remove the args parameter of Generator::doSetup() and
add a new virtual handleOption(key, value) to the generators
instead. Add missing initialization.
Change-Id: I9bc844172a81244f729d87a3d4262545e6433904
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, 3 insertions, 2 deletions
diff --git a/sources/shiboken2/generator/generator.h b/sources/shiboken2/generator/generator.h index 010ed868c..6028afa64 100644 --- a/sources/shiboken2/generator/generator.h +++ b/sources/shiboken2/generator/generator.h @@ -166,9 +166,10 @@ public: Generator(); virtual ~Generator(); - bool setup(const ApiExtractor& extractor, const QMap<QString, QString> args); + bool setup(const ApiExtractor& extractor); virtual OptionDescriptions options() const; + virtual bool handleOption(const QString &key, const QString &value); /// Returns the classes used to generate the binding code. AbstractMetaClassList classes() const; @@ -348,7 +349,7 @@ protected: virtual QString fileNameForContext(GeneratorContext &context) const = 0; - virtual bool doSetup(const QMap<QString, QString>& args) = 0; + virtual bool doSetup() = 0; /** * Write the bindding code for an AbstractMetaClass. |