aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/itemreadervisitorstate.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2018-01-11 14:43:31 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2018-01-17 06:37:46 +0000
commit712c5474b08af11b34c37b545f4e2b7baab27a9f (patch)
treef1794f9951b96f2e10222b80d0bf73fba7ebfb50 /src/lib/corelib/language/itemreadervisitorstate.h
parent45a1fab55d3330bc8b581e68023e4cea8fd5065c (diff)
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 <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/itemreadervisitorstate.h')
-rw-r--r--src/lib/corelib/language/itemreadervisitorstate.h4
1 files changed, 4 insertions, 0 deletions
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<QString> m_filesRead;
QHash<QString, QStringList> m_directoryEntries;
+ Item *m_mostDerivingItem = nullptr;
class ASTCache;
ASTCache * const m_astCache;