QDBusConnectionPrivate: Remove parent argument

This class is reference counted, having a parent would
interfere with this reference counting code.

Change-Id: I5ab4fdfa74af94d8b760bd3600bd1f828e3d2b91
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ievgenii Meshcheriakov 2023-09-04 14:30:10 +02:00
parent 29eb5d8ace
commit 4c2f944958
2 changed files with 4 additions and 5 deletions

View File

@ -159,7 +159,7 @@ public:
typedef QHash<QString, WatchedServiceData> WatchedServicesHash;
// public methods are entry points from other objects
explicit QDBusConnectionPrivate(QObject *parent = nullptr);
QDBusConnectionPrivate();
~QDBusConnectionPrivate();
void createBusService();

View File

@ -301,7 +301,7 @@ static void qDBusNewConnection(DBusServer *server, DBusConnection *connection, v
if (serverConnection->anonymousAuthenticationAllowed)
q_dbus_connection_set_allow_anonymous(connection, true);
QDBusConnectionPrivate *newConnection = new QDBusConnectionPrivate(serverConnection->parent());
QDBusConnectionPrivate *newConnection = new QDBusConnectionPrivate;
manager->addConnection(
"QDBusServer-"_L1 + QString::number(reinterpret_cast<qulonglong>(newConnection), 16),
@ -1011,9 +1011,8 @@ void QDBusConnectionPrivate::deliverCall(QObject *object, const QDBusMessage &ms
return;
}
QDBusConnectionPrivate::QDBusConnectionPrivate(QObject *p)
: QObject(p),
ref(1),
QDBusConnectionPrivate::QDBusConnectionPrivate()
: ref(1),
mode(InvalidMode),
busService(nullptr),
connection(nullptr),