aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlcompiler/qdeferredpointer_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-03-31 17:13:09 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-04-01 10:34:10 +0200
commit3827b7039df47e756bdee7ebe4e5bb481cad081d (patch)
tree9b989530df222174c9dded623281145a78c1d8fd /src/qmlcompiler/qdeferredpointer_p.h
parentc091559307b063475b1e469487dfecbcd61f17b0 (diff)
QmlCompiler: Avoid excessive lazy loading in QDeferredWeakPointer
We don't need to load the types just to compare the pointers. Change-Id: If93f7460f6e247f119f366a4c02a98d3e5f6535f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmlcompiler/qdeferredpointer_p.h')
-rw-r--r--src/qmlcompiler/qdeferredpointer_p.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/qmlcompiler/qdeferredpointer_p.h b/src/qmlcompiler/qdeferredpointer_p.h
index decc4225a6..040e6fa8ca 100644
--- a/src/qmlcompiler/qdeferredpointer_p.h
+++ b/src/qmlcompiler/qdeferredpointer_p.h
@@ -222,19 +222,13 @@ public:
return QWeakPointer<T>(*this).toStrongRef();
}
- bool isNull() const
- {
- lazyLoad();
- return m_data.isNull();
- }
+ bool isNull() const { return m_data.isNull(); }
explicit operator bool() const noexcept { return !isNull(); }
bool operator !() const noexcept { return isNull(); }
friend bool operator==(const QDeferredWeakPointer &a, const QDeferredWeakPointer &b)
{
- a.lazyLoad();
- b.lazyLoad();
return a.m_data == b.m_data;
}