From 712c5474b08af11b34c37b545f4e2b7baab27a9f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 11 Jan 2018 14:43:31 +0100 Subject: Fix id pointer of base items In the following example the name of the derived product should be "derived", but it was "base". ---BaseProduct.qbs--- Product { id: baseProduct property string foo: "base" name: baseProduct.foo } --derived.qbs-- BaseProduct { foo: "derived" } The id baseProduct still pointed to the Product item originally imported from BaseProduct.qbs. Fix the item pointers in the base id scopes when handling item inheritance. Task-number: QBS-1016 Task-number: QBS-1262 Change-Id: Id11b98aa6780f8bbbda86fda5a7d11a0e006d889 Reviewed-by: Christian Kandeler --- src/lib/corelib/language/itemreadervisitorstate.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib/corelib/language/itemreadervisitorstate.h') diff --git a/src/lib/corelib/language/itemreadervisitorstate.h b/src/lib/corelib/language/itemreadervisitorstate.h index a72d5fe3a..0eab34dbb 100644 --- a/src/lib/corelib/language/itemreadervisitorstate.h +++ b/src/lib/corelib/language/itemreadervisitorstate.h @@ -64,10 +64,14 @@ public: void cacheDirectoryEntries(const QString &dirPath, const QStringList &entries); bool findDirectoryEntries(const QString &dirPath, QStringList *entries) const; + Item *mostDerivingItem() const; + void setMostDerivingItem(Item *item); + private: Logger &m_logger; Set m_filesRead; QHash m_directoryEntries; + Item *m_mostDerivingItem = nullptr; class ASTCache; ASTCache * const m_astCache; -- cgit v1.2.3