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