diff options
-rw-r--r-- | abstractmetabuilder.cpp | 5 | ||||
-rw-r--r-- | abstractmetalang.h | 25 |
2 files changed, 13 insertions, 17 deletions
diff --git a/abstractmetabuilder.cpp b/abstractmetabuilder.cpp index 75190a87a..b0cbc24a0 100644 --- a/abstractmetabuilder.cpp +++ b/abstractmetabuilder.cpp @@ -148,19 +148,16 @@ void AbstractMetaBuilder::registerHashFunction(FunctionModelItem function_item) void AbstractMetaBuilder::registerToStringCapability(FunctionModelItem function_item) { - // TODO This must set an AbstractMetaFunction, not a FunctionModelItem! - #if 0 ArgumentList arguments = function_item->arguments(); if (arguments.size() == 2) { if (arguments.at(0)->type().toString() == "QDebug") { ArgumentModelItem arg = arguments.at(1); if (AbstractMetaClass *cls = argumentToClass(arg)) { if (arg->type().indirections() < 2) - cls->setToStringCapability(function_item); + cls->setToStringCapability(true); } } } - #endif } void AbstractMetaBuilder::traverseOperatorFunction(FunctionModelItem item) diff --git a/abstractmetalang.h b/abstractmetalang.h index 7a5b90228..333aaf3cb 100644 --- a/abstractmetalang.h +++ b/abstractmetalang.h @@ -1382,13 +1382,13 @@ public: m_hasEqualsOperator(false), m_hasCloneOperator(false), m_isTypeAlias(false), + m_hasToStringCapability(false), m_enclosingClass(0), m_baseClass(0), m_templateBaseClass(0), m_extractedInterface(0), m_primaryInterfaceImplementor(0), m_typeEntry(0), - //m_qDebugStreamFunction(0) m_stream(false) { } @@ -1717,17 +1717,6 @@ public: { return m_hasHashFunction; } -#if 0 - void setToStringCapability(FunctionModelItem fun) - { - m_qDebugStreamFunction = fun; - } - - FunctionModelItem hasToStringCapability() const - { - return m_qDebugStreamFunction; - } -#endif virtual bool hasDefaultToStringFunction() const; void setHasEqualsOperator(bool on) @@ -1875,6 +1864,15 @@ public: return m_stream; } + void setToStringCapability(bool value) + { + m_hasToStringCapability = value; + } + + bool hasToStringCapability() const + { + return m_hasToStringCapability; + } private: uint m_namespace : 1; uint m_qobject : 1; @@ -1892,7 +1890,8 @@ private: uint m_hasEqualsOperator : 1; uint m_hasCloneOperator : 1; uint m_isTypeAlias : 1; - uint m_reserved : 18; + uint m_hasToStringCapability : 1; + uint m_reserved : 17; const AbstractMetaClass *m_enclosingClass; AbstractMetaClass *m_baseClass; |