Commit cbc122e2 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

C++: Introduce CreateBindings::Ptr



typedef for QSharedPointer<CreateBindings>

Change-Id: Idf7a9984bb90da82407abd4b7dec9f40926beac8
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent de68ac54
......@@ -162,7 +162,7 @@ LookupContext::LookupContext(Document::Ptr thisDocument,
LookupContext::LookupContext(Document::Ptr expressionDocument,
Document::Ptr thisDocument,
const Snapshot &snapshot,
QSharedPointer<CreateBindings> bindings)
CreateBindings::Ptr bindings)
: _expressionDocument(expressionDocument)
, _thisDocument(thisDocument)
, _snapshot(snapshot)
......
......@@ -107,6 +107,8 @@ class CPLUSPLUS_EXPORT CreateBindings
Q_DISABLE_COPY(CreateBindings)
public:
typedef QSharedPointer<CreateBindings> 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<CreateBindings> bindings = QSharedPointer<CreateBindings>());
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<CreateBindings> bindings() const
CreateBindings::Ptr bindings() const
{ return _bindings; }
static QList<const Name *> fullyQualifiedName(Symbol *symbol);
......@@ -264,7 +266,7 @@ private:
Snapshot _snapshot;
// Bindings
QSharedPointer<CreateBindings> _bindings;
CreateBindings::Ptr _bindings;
bool m_expandTemplates;
};
......
......@@ -50,7 +50,7 @@ TypeOfExpression::TypeOfExpression():
}
void TypeOfExpression::init(Document::Ptr thisDocument, const Snapshot &snapshot,
QSharedPointer<CreateBindings> bindings,
CreateBindings::Ptr bindings,
const QSet<const Declaration *> &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<CreateBindings>(new CreateBindings(thisDocument, snapshot));
m_bindings = CreateBindings::Ptr(new CreateBindings(thisDocument, snapshot));
m_environment.clear();
m_autoDeclarationsBeingResolved = autoDeclarationsBeingResolved;
......
......@@ -62,7 +62,7 @@ public:
*/
void init(Document::Ptr thisDocument,
const Snapshot &snapshot,
QSharedPointer<CreateBindings> bindings = QSharedPointer<CreateBindings>(),
CreateBindings::Ptr bindings = CreateBindings::Ptr(),
const QSet<const Declaration *> &autoDeclarationsBeingResolved
= QSet<const Declaration *>());
......@@ -142,7 +142,7 @@ private:
private:
Document::Ptr m_thisDocument;
Snapshot m_snapshot;
QSharedPointer<CreateBindings> m_bindings;
CreateBindings::Ptr m_bindings;
ExpressionAST *m_ast;
Scope *m_scope;
LookupContext m_lookupContext;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment