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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user