Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
1e1d8e45
Commit
1e1d8e45
authored
May 17, 2010
by
Roberto Raggi
Browse files
Use the Control created by CPlusPlus::CreateBindings.
parent
35c50dcb
Changes
2
Show whitespace changes
Inline
Side-by-side
src/libs/cplusplus/LookupContext.cpp
View file @
1e1d8e45
...
...
@@ -90,7 +90,6 @@ bool ClassOrNamespace::CompareName::operator()(const Name *name, const Name *oth
// LookupContext
/////////////////////////////////////////////////////////////////////
LookupContext
::
LookupContext
()
:
_control
(
0
)
{
}
LookupContext
::
LookupContext
(
Document
::
Ptr
thisDocument
,
...
...
@@ -99,7 +98,6 @@ LookupContext::LookupContext(Document::Ptr thisDocument,
_thisDocument
(
thisDocument
),
_snapshot
(
snapshot
)
{
_control
=
_expressionDocument
->
control
();
}
LookupContext
::
LookupContext
(
Document
::
Ptr
expressionDocument
,
...
...
@@ -109,12 +107,10 @@ LookupContext::LookupContext(Document::Ptr expressionDocument,
_thisDocument
(
thisDocument
),
_snapshot
(
snapshot
)
{
_control
=
_expressionDocument
->
control
();
}
LookupContext
::
LookupContext
(
const
LookupContext
&
other
)
:
_control
(
other
.
_control
),
_expressionDocument
(
other
.
_expressionDocument
),
:
_expressionDocument
(
other
.
_expressionDocument
),
_thisDocument
(
other
.
_thisDocument
),
_snapshot
(
other
.
_snapshot
),
_bindings
(
other
.
_bindings
)
...
...
@@ -122,7 +118,6 @@ LookupContext::LookupContext(const LookupContext &other)
LookupContext
&
LookupContext
::
operator
=
(
const
LookupContext
&
other
)
{
_control
=
other
.
_control
;
_expressionDocument
=
other
.
_expressionDocument
;
_thisDocument
=
other
.
_thisDocument
;
_snapshot
=
other
.
_snapshot
;
...
...
@@ -150,11 +145,8 @@ void LookupContext::setBindings(QSharedPointer<CreateBindings> bindings)
_bindings
=
bindings
;
}
bool
LookupContext
::
isValid
()
const
{
return
_control
!=
0
;
}
Control
*
LookupContext
::
control
()
const
{
return
_
control
;
}
{
return
bindings
()
->
control
()
;
}
Document
::
Ptr
LookupContext
::
expressionDocument
()
const
{
return
_expressionDocument
;
}
...
...
@@ -391,6 +383,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
else
if
(
s
->
name
()
->
isQualifiedNameId
())
continue
;
// skip qualified ids.
#if 0
if (templateId && (s->isDeclaration() || s->isFunction())) {
FullySpecifiedType ty = GenTemplateInstance::instantiate(templateId, s, _control);
...
...
@@ -415,6 +408,7 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
continue;
}
}
#endif
result
->
append
(
s
);
}
...
...
src/libs/cplusplus/LookupContext.h
View file @
1e1d8e45
...
...
@@ -204,8 +204,6 @@ public:
LookupContext
(
const
LookupContext
&
other
);
LookupContext
&
operator
=
(
const
LookupContext
&
other
);
bool
isValid
()
const
;
Document
::
Ptr
expressionDocument
()
const
;
Document
::
Ptr
thisDocument
()
const
;
Document
::
Ptr
document
(
const
QString
&
fileName
)
const
;
...
...
@@ -228,8 +226,6 @@ public:
static
QList
<
const
Name
*>
fullyQualifiedName
(
Symbol
*
symbol
);
private:
Control
*
_control
;
// The current expression.
Document
::
Ptr
_expressionDocument
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment