diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-05-03 08:52:41 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-05-03 11:49:35 +0200 |
commit | 9c37876d6f649b3c9bd1411d3c7ffe620786f1a8 (patch) | |
tree | fefb461dfac1bbc624f1ae339b9f0b1ab3511c2d /sources/shiboken6/ApiExtractor/abstractmetalang.h | |
parent | bdfb36b880cecc40fa4b15ed963ee3e1c033d469 (diff) |
Expose the qHash() functions as tp_hash
The hash function attribute in AbstractMetaClass was so far populated
by the code model but unused by the generator. Change the
AbstractMetaClass attribute to be a string (to accommodate for
std::hash as well in a later change) and use it in the generator.
[ChangeLog][PySide6] All qHash() functions are now exposed to Python.
Fixes: PYSIDE-1906
Change-Id: I8b4cc503d8b073a6d437bbc0f6c5c7e048ec7ab9
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6/ApiExtractor/abstractmetalang.h')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetalang.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetalang.h b/sources/shiboken6/ApiExtractor/abstractmetalang.h index 23a34e7e1..64d5cd411 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetalang.h +++ b/sources/shiboken6/ApiExtractor/abstractmetalang.h @@ -270,7 +270,9 @@ public: ComplexTypeEntry *typeEntry(); void setTypeEntry(ComplexTypeEntry *type); - void setHasHashFunction(bool on); + /// Returns the global hash function as found by the code parser + QString hashFunction() const; + void setHashFunction(const QString &); /// Returns whether the class has a qHash() overload. Currently unused, /// specified in type system. |