From da4ae1bc1ec74cdb4e75f4ebac30886ba4a1909c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Fri, 24 Mar 2017 02:26:06 +0100 Subject: NOISSUE reimplement package dependencies It is now stored as a hashmap There is also a parentUid to limit depsolving by encapsulating by version --- api/logic/meta/VersionList.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'api/logic/meta/VersionList.h') diff --git a/api/logic/meta/VersionList.h b/api/logic/meta/VersionList.h index 08d71230..faacdbf8 100644 --- a/api/logic/meta/VersionList.h +++ b/api/logic/meta/VersionList.h @@ -15,8 +15,8 @@ #pragma once -#include "BaseVersionList.h" #include "BaseEntity.h" +#include "BaseVersionList.h" #include #include @@ -56,16 +56,30 @@ public: QString localFilename() const override; - QString uid() const { return m_uid; } - QString name() const { return m_name; } + QString parentUid() const + { + return m_parentUid; + } + QString uid() const + { + return m_uid; + } + QString name() const + { + return m_name; + } QString humanReadable() const; VersionPtr getVersion(const QString &version); - QVector versions() const { return m_versions; } + QVector versions() const + { + return m_versions; + } public: // for usage only by parsers void setName(const QString &name); + void setParentUid(const QString &parentUid); void setVersions(const QVector &versions); void merge(const BaseEntity::Ptr &other) override; void parse(const QJsonObject &obj) override; @@ -74,12 +88,15 @@ signals: void nameChanged(const QString &name); protected slots: - void updateListData(QList) override {} + void updateListData(QList) override + { + } private: QVector m_versions; QHash m_lookup; QString m_uid; + QString m_parentUid; QString m_name; VersionPtr m_recommended; @@ -87,6 +104,5 @@ private: void setupAddedVersion(const int row, const VersionPtr &version); }; - } Q_DECLARE_METATYPE(Meta::VersionListPtr) -- cgit v1.2.3