Set parent on newly created fwupd resource

Without this patch, the resource lacks a parent backend, which
causes issues when attempting to signal changes in it later on
(as AbstractResource depends on there being a backend set)

Differential Revision:
parent b41f8448
......@@ -85,7 +85,7 @@ void FwupdBackend::addResourceToList(FwupdResource* res)
FwupdResource * FwupdBackend::createDevice(FwupdDevice *device)
const QString name = QString::fromUtf8(fwupd_device_get_name(device));
FwupdResource* res = new FwupdResource(name, nullptr);
FwupdResource* res = new FwupdResource(name, this);
const QString deviceID = QString::fromUtf8(fwupd_device_get_id(device));
......@@ -94,7 +94,7 @@ private:
static QByteArray getChecksum(const QString &filename, QCryptographicHash::Algorithm hashAlgorithm);
static bool downloadFile(const QUrl &uri, const QString &filename);
static FwupdResource * createDevice(FwupdDevice *device);
FwupdResource * createDevice(FwupdDevice *device);
FwupdResource * createRelease(FwupdDevice *device);
FwupdResource * createApp(FwupdDevice *device);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment