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
+2 -2
View File
@@ -11,9 +11,9 @@
#include "providers/twitch/TwitchIrcServer.hpp" // NOTE: Included to access the mentions channel
#include "singletons/Settings.hpp"
#include "util/IrcHelpers.hpp"
#include "util/QObjectRef.hpp"
#include <QMetaEnum>
#include <QPointer>
#include <cassert>
#include <cstdlib>
@@ -151,7 +151,7 @@ void IrcServer::initializeConnection(IrcConnection *connection,
[[fallthrough]];
case IrcAuthType::Pass:
this->data_->getPassword(
this, [conn = new QObjectRef(connection) /* can't copy */,
this, [conn = new QPointer(connection) /* can't copy */,
this](const QString &password) mutable {
if (*conn)
{