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/Version.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'api/logic/meta/Version.cpp') diff --git a/api/logic/meta/Version.cpp b/api/logic/meta/Version.cpp index fee7d049..af9d4f10 100644 --- a/api/logic/meta/Version.cpp +++ b/api/logic/meta/Version.cpp @@ -65,6 +65,10 @@ void Meta::Version::merge(const std::shared_ptr &other) { setRequires(version->m_requires); } + if (m_parentUid != version->m_parentUid) + { + setParentUid(version->m_parentUid); + } setData(version->m_data); } @@ -74,21 +78,30 @@ QString Meta::Version::localFilename() const return m_uid + '/' + m_version + ".json"; } +void Meta::Version::setParentUid(const QString& parentUid) +{ + m_parentUid = parentUid; + emit requiresChanged(); +} + void Meta::Version::setType(const QString &type) { m_type = type; emit typeChanged(); } + void Meta::Version::setTime(const qint64 time) { m_time = time; emit timeChanged(); } -void Meta::Version::setRequires(const QVector &requires) + +void Meta::Version::setRequires(const QHash &requires) { m_requires = requires; emit requiresChanged(); } + void Meta::Version::setData(const VersionFilePtr &data) { m_data = data; -- cgit v1.2.3