Remove QObjectRef in favor of QPointer (#4666)

* replace usage of QObjectRef with QPointer

* delete QObjectRef class

* inlucde QPointer header

* Add changelog entry

* use isNull() instead of ! data()

---------

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Arne
2023-06-04 13:24:04 +02:00
committed by GitHub
parent e803b6de95
commit 6681ed5bfb
7 changed files with 20 additions and 105 deletions
+5 -5
View File
@@ -174,7 +174,7 @@ void loadUncached(std::shared_ptr<NetworkData> &&data)
}
auto handleReply = [data, reply]() mutable {
if (data->hasCaller_ && !data->caller_.get())
if (data->hasCaller_ && data->caller_.isNull())
{
return;
}
@@ -350,7 +350,7 @@ void loadCached(std::shared_ptr<NetworkData> &&data)
// XXX: If outcome is Failure, we should invalidate the cache file
// somehow/somewhere
/*auto outcome =*/
if (data->hasCaller_ && !data->caller_.get())
if (data->hasCaller_ && data->caller_.isNull())
{
return;
}
@@ -359,7 +359,7 @@ void loadCached(std::shared_ptr<NetworkData> &&data)
else
{
postToThread([data, result]() {
if (data->hasCaller_ && !data->caller_.get())
if (data->hasCaller_ && data->caller_.isNull())
{
return;
}
@@ -373,7 +373,7 @@ void loadCached(std::shared_ptr<NetworkData> &&data)
{
if (data->executeConcurrently_ || isGuiThread())
{
if (data->hasCaller_ && !data->caller_.get())
if (data->hasCaller_ && data->caller_.isNull())
{
return;
}
@@ -383,7 +383,7 @@ void loadCached(std::shared_ptr<NetworkData> &&data)
else
{
postToThread([data]() {
if (data->hasCaller_ && !data->caller_.get())
if (data->hasCaller_ && data->caller_.isNull())
{
return;
}