Commit 9778f1f9 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

No need to keep the objects inside every resource

parent 5ee0a9c8
......@@ -28,11 +28,12 @@
#include <QJsonArray>
#include <QDebug>
const QStringList PackageKitResource::m_objects({ QStringLiteral("qrc:/qml/DependenciesButton.qml") });
PackageKitResource::PackageKitResource(QString packageName, QString summary, PackageKitBackend* parent)
: AbstractResource(parent)
, m_summary(std::move(summary))
, m_name(std::move(packageName))
, m_objects({ QStringLiteral("qrc:/qml/DependenciesButton.qml") })
{
setObjectName(m_name);
......
......@@ -108,7 +108,7 @@ class PackageKitResource : public AbstractResource
const QString m_name;
PackageKit::Details m_details;
int m_dependenciesCount = -1;
const QStringList m_objects;
static const QStringList m_objects;
};
#endif // PACKAGEKITRESOURCE_H
......@@ -69,11 +69,12 @@ QDebug operator<<(QDebug debug, const QSnapdSlot* slot)
return debug;
}
const QStringList SnapResource::m_objects({ QStringLiteral("qrc:/snapui/PermissionsButton.qml") });
SnapResource::SnapResource(QSharedPointer<QSnapdSnap> snap, AbstractResource::State state, SnapBackend* backend)
: AbstractResource(backend)
, m_state(state)
, m_snap(snap)
, m_objects({ QStringLiteral("qrc:/snapui/PermissionsButton.qml") })
{
setObjectName(snap->name());
}
......
......@@ -72,7 +72,7 @@ public:
QSharedPointer<QSnapdSnap> m_snap;
mutable QVariant m_icon;
const QStringList m_objects;
static const QStringList m_objects;
};
#endif // SNAPRESOURCE_H
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