diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-04 21:46:07 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-02-15 23:47:54 +0100 |
| commit | f3d66dc1d32ca3ebefbd0fe58d85e40558b0016a (patch) | |
| tree | 421bdbf3c186a507d8247b779a34880bf4abfd1f /src/qmlcompiler/qdeferredpointer_p.h | |
| parent | 81ceb9d1542754324a2da6e7bdf7cacfede6f096 (diff) | |
QQmlJSRegisterContent: Make conversions explicit
Introduce a new kind to QQmlJSRegisterContent: "conversion". This is
what we store when we merge multiple types together, or convert a
selection of types into a new one. This way we can record what the
original types were, and later figure out whether we can losslessly
convert them already at the point where we store them.
For now, only merges are implemented.
Change-Id: If4ad0b1f075199e6aa1532959cf9591ba6755709
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qdeferredpointer_p.h')
| -rw-r--r-- | src/qmlcompiler/qdeferredpointer_p.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/qmlcompiler/qdeferredpointer_p.h b/src/qmlcompiler/qdeferredpointer_p.h index 9bf67fb27f..2da17b3dd9 100644 --- a/src/qmlcompiler/qdeferredpointer_p.h +++ b/src/qmlcompiler/qdeferredpointer_p.h @@ -120,6 +120,26 @@ public: return !(a == b); } + friend bool operator<(const QDeferredSharedPointer &a, const QDeferredSharedPointer &b) + { + return a.m_data < b.m_data; + } + + friend bool operator<=(const QDeferredSharedPointer &a, const QDeferredSharedPointer &b) + { + return a.m_data <= b.m_data; + } + + friend bool operator>(const QDeferredSharedPointer &a, const QDeferredSharedPointer &b) + { + return a.m_data > b.m_data; + } + + friend bool operator>=(const QDeferredSharedPointer &a, const QDeferredSharedPointer &b) + { + return a.m_data >= b.m_data; + } + template <typename U> friend bool operator==(const QDeferredSharedPointer &a, const QSharedPointer<U> &b) { |
