diff --git a/src/libs/cplusplus/LookupContext.cpp b/src/libs/cplusplus/LookupContext.cpp index d4edde60355..90b7f4e0765 100644 --- a/src/libs/cplusplus/LookupContext.cpp +++ b/src/libs/cplusplus/LookupContext.cpp @@ -162,7 +162,7 @@ LookupContext::LookupContext(Document::Ptr thisDocument, LookupContext::LookupContext(Document::Ptr expressionDocument, Document::Ptr thisDocument, const Snapshot &snapshot, - QSharedPointer bindings) + CreateBindings::Ptr bindings) : _expressionDocument(expressionDocument) , _thisDocument(thisDocument) , _snapshot(snapshot) diff --git a/src/libs/cplusplus/LookupContext.h b/src/libs/cplusplus/LookupContext.h index 3e39e315042..468f6268f2b 100644 --- a/src/libs/cplusplus/LookupContext.h +++ b/src/libs/cplusplus/LookupContext.h @@ -107,6 +107,8 @@ class CPLUSPLUS_EXPORT CreateBindings Q_DISABLE_COPY(CreateBindings) public: + typedef QSharedPointer Ptr; + CreateBindings(Document::Ptr thisDocument, const Snapshot &snapshot); virtual ~CreateBindings(); @@ -214,7 +216,7 @@ public: LookupContext(Document::Ptr expressionDocument, Document::Ptr thisDocument, const Snapshot &snapshot, - QSharedPointer bindings = QSharedPointer()); + CreateBindings::Ptr bindings = CreateBindings::Ptr()); LookupContext(const LookupContext &other); LookupContext &operator = (const LookupContext &other); @@ -236,7 +238,7 @@ public: LookupScope *lookupParent(Symbol *symbol) const; /// \internal - QSharedPointer bindings() const + CreateBindings::Ptr bindings() const { return _bindings; } static QList fullyQualifiedName(Symbol *symbol); @@ -264,7 +266,7 @@ private: Snapshot _snapshot; // Bindings - QSharedPointer _bindings; + CreateBindings::Ptr _bindings; bool m_expandTemplates; }; diff --git a/src/libs/cplusplus/TypeOfExpression.cpp b/src/libs/cplusplus/TypeOfExpression.cpp index 4bb83f53cf9..bc0792262a4 100644 --- a/src/libs/cplusplus/TypeOfExpression.cpp +++ b/src/libs/cplusplus/TypeOfExpression.cpp @@ -50,7 +50,7 @@ TypeOfExpression::TypeOfExpression(): } void TypeOfExpression::init(Document::Ptr thisDocument, const Snapshot &snapshot, - QSharedPointer bindings, + CreateBindings::Ptr bindings, const QSet &autoDeclarationsBeingResolved) { m_thisDocument = thisDocument; @@ -62,7 +62,7 @@ void TypeOfExpression::init(Document::Ptr thisDocument, const Snapshot &snapshot Q_ASSERT(m_bindings.isNull()); m_bindings = bindings; if (m_bindings.isNull()) - m_bindings = QSharedPointer(new CreateBindings(thisDocument, snapshot)); + m_bindings = CreateBindings::Ptr(new CreateBindings(thisDocument, snapshot)); m_environment.clear(); m_autoDeclarationsBeingResolved = autoDeclarationsBeingResolved; diff --git a/src/libs/cplusplus/TypeOfExpression.h b/src/libs/cplusplus/TypeOfExpression.h index a62f50ba6af..0308f9a45ee 100644 --- a/src/libs/cplusplus/TypeOfExpression.h +++ b/src/libs/cplusplus/TypeOfExpression.h @@ -62,7 +62,7 @@ public: */ void init(Document::Ptr thisDocument, const Snapshot &snapshot, - QSharedPointer bindings = QSharedPointer(), + CreateBindings::Ptr bindings = CreateBindings::Ptr(), const QSet &autoDeclarationsBeingResolved = QSet()); @@ -142,7 +142,7 @@ private: private: Document::Ptr m_thisDocument; Snapshot m_snapshot; - QSharedPointer m_bindings; + CreateBindings::Ptr m_bindings; ExpressionAST *m_ast; Scope *m_scope; LookupContext m_lookupContext;