From 8c03a55d03b2e63b760ec3be4a37285304b65b32 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 15 Apr 2010 18:45:40 -0300 Subject: Do not set the include file on TypeEntries when the include file does not exists or it's the global header. --- abstractmetabuilder.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'abstractmetabuilder.h') diff --git a/abstractmetabuilder.h b/abstractmetabuilder.h index 9aef28a..e676f12 100644 --- a/abstractmetabuilder.h +++ b/abstractmetabuilder.h @@ -29,7 +29,8 @@ #include "typesystem.h" #include "typeparser.h" -#include +#include +#include class TypeDatabase; @@ -170,6 +171,13 @@ public: return m_qmetatypeDeclaredTypenames; } + /** + * AbstractMetaBuilder should know what's the global header being used, + * so any class declared under this header wont have the include file + * filled. + */ + void setGlobalHeader(const QString& globalHeader); + protected: AbstractMetaClass *argumentToClass(ArgumentModelItem); @@ -213,6 +221,7 @@ protected: private: void sortLists(); AbstractMetaArgumentList reverseList(const AbstractMetaArgumentList& list); + void setInclude(TypeEntry* te, const QString& fileName) const; AbstractMetaClassList m_metaClasses; AbstractMetaClassList m_templates; @@ -242,6 +251,7 @@ private: QSet m_qmetatypeDeclaredTypenames; QString m_logDirectory; + QFileInfo m_globalHeader; }; #endif // ABSTRACTMETBUILDER_H -- cgit v1.2.3