diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-03-28 10:34:45 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-01 15:36:26 +0000 |
commit | bf93d869a709393797d5c75e1341dfe5b5a60d14 (patch) | |
tree | 315972709cd03ad6041861637ce64d1f4ffd919e /sources/shiboken2/ApiExtractor/abstractmetabuilder.h | |
parent | f53aed12cae42db9d142b8829b9d815b4384dced (diff) |
shiboken: Refactor AbstractMetaBuilder::classesTopologicalSorted()
Change the function parameter to be a list always, making the logic of
the inner classes clearer.
In the implementation, use a of QHash<AbstractMetaClass*, int> instead
of hashing by name, which makes it possible to disambiguate namespaces
extended in modules.
This also allows for a drastic simplification of the code trying to
determine the dependency given by parameter default values. Instead of
trying to match by name, correctly qualifying it, the matching can be
done by TypeEntry pointers.
Change-Id: Ia17bf6e109576bac029fb016e5e11309777d0735
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/abstractmetabuilder.h')
-rw-r--r-- | sources/shiboken2/ApiExtractor/abstractmetabuilder.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/shiboken2/ApiExtractor/abstractmetabuilder.h b/sources/shiboken2/ApiExtractor/abstractmetabuilder.h index 7e5c1fc79..ed89060ac 100644 --- a/sources/shiboken2/ApiExtractor/abstractmetabuilder.h +++ b/sources/shiboken2/ApiExtractor/abstractmetabuilder.h @@ -68,12 +68,10 @@ public: AbstractMetaEnum *findEnum(const TypeEntry *typeEntry) const; /** - * Sorts a list of classes topologically, if an AbstractMetaClass object - * is passed the list of classes will be its inner classes, otherwise - * the list will be the module global classes. + * Sorts a list of classes topologically. * \return a list of classes sorted topologically */ - AbstractMetaClassList classesTopologicalSorted(const AbstractMetaClass *cppClass = Q_NULLPTR, + AbstractMetaClassList classesTopologicalSorted(const AbstractMetaClassList &classList, const Dependencies &additionalDependencies = Dependencies()) const; bool build(const QByteArrayList &arguments, |