Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
02ee76b8
Commit
02ee76b8
authored
15 years ago
by
Roberto Raggi
Browse files
Options
Downloads
Patches
Plain Diff
Initalize the members of the binder.
parent
138221ac
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/libs/qmljs/qmljsbind.cpp
+12
-6
12 additions, 6 deletions
src/libs/qmljs/qmljsbind.cpp
src/libs/qmljs/qmljsbind.h
+4
-4
4 additions, 4 deletions
src/libs/qmljs/qmljsbind.h
src/plugins/qmljseditor/qmlcodecompletion.cpp
+3
-3
3 additions, 3 deletions
src/plugins/qmljseditor/qmlcodecompletion.cpp
with
19 additions
and
13 deletions
src/libs/qmljs/qmljsbind.cpp
+
12
−
6
View file @
02ee76b8
...
@@ -35,7 +35,14 @@ using namespace QmlJS;
...
@@ -35,7 +35,14 @@ using namespace QmlJS;
using
namespace
QmlJS
::
AST
;
using
namespace
QmlJS
::
AST
;
using
namespace
QmlJS
::
Interpreter
;
using
namespace
QmlJS
::
Interpreter
;
Bind
::
Bind
()
Bind
::
Bind
(
Interpreter
::
Engine
*
interp
)
:
_interp
(
interp
),
_interestingMember
(
0
),
_currentObjectValue
(
0
),
_typeEnvironment
(
0
),
_idEnvironment
(
0
),
_interestingObjectValue
(
0
),
_rootObjectValue
(
0
)
{
{
}
}
...
@@ -43,20 +50,19 @@ Bind::~Bind()
...
@@ -43,20 +50,19 @@ Bind::~Bind()
{
{
}
}
Interpreter
::
ObjectValue
*
Bind
::
operator
()(
Document
::
Ptr
doc
,
Snapshot
&
snapshot
,
UiObjectMember
*
member
,
Interpreter
::
Engine
&
interp
)
Interpreter
::
ObjectValue
*
Bind
::
operator
()(
Document
::
Ptr
doc
,
const
Snapshot
&
snapshot
,
UiObjectMember
*
member
)
{
{
UiProgram
*
program
=
doc
->
qmlProgram
();
UiProgram
*
program
=
doc
->
qmlProgram
();
if
(
!
program
)
if
(
!
program
)
return
0
;
return
0
;
_doc
=
doc
;
_doc
=
doc
;
_snapshot
=
&
snapshot
;
_snapshot
=
snapshot
;
_interestingMember
=
member
;
_interestingMember
=
member
;
_interp
=
&
interp
;
_currentObjectValue
=
0
;
_currentObjectValue
=
0
;
_typeEnvironment
=
_interp
->
newObject
(
0
);
_typeEnvironment
=
_interp
->
newObject
(
/*prototype =*/
0
);
_idEnvironment
=
_interp
->
newObject
(
0
);
_idEnvironment
=
_interp
->
newObject
(
/*prototype =*/
0
);
_interestingObjectValue
=
0
;
_interestingObjectValue
=
0
;
_rootObjectValue
=
0
;
_rootObjectValue
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/libs/qmljs/qmljsbind.h
+
4
−
4
View file @
02ee76b8
...
@@ -39,10 +39,10 @@ namespace QmlJS {
...
@@ -39,10 +39,10 @@ namespace QmlJS {
class
QMLJS_EXPORT
Bind
:
protected
AST
::
Visitor
class
QMLJS_EXPORT
Bind
:
protected
AST
::
Visitor
{
{
public:
public:
Bind
();
Bind
(
Interpreter
::
Engine
*
interp
);
virtual
~
Bind
();
virtual
~
Bind
();
Interpreter
::
ObjectValue
*
operator
()(
Document
::
Ptr
doc
,
Snapshot
&
snapshot
,
AST
::
UiObjectMember
*
member
,
Interpreter
::
Engine
&
interp
);
Interpreter
::
ObjectValue
*
operator
()(
Document
::
Ptr
doc
,
const
Snapshot
&
snapshot
,
AST
::
UiObjectMember
*
member
);
protected:
protected:
void
accept
(
AST
::
Node
*
node
);
void
accept
(
AST
::
Node
*
node
);
...
@@ -148,9 +148,9 @@ protected:
...
@@ -148,9 +148,9 @@ protected:
private:
private:
Document
::
Ptr
_doc
;
Document
::
Ptr
_doc
;
Snapshot
*
_snapshot
;
Snapshot
_snapshot
;
AST
::
UiObjectMember
*
_interestingMember
;
Interpreter
::
Engine
*
_interp
;
Interpreter
::
Engine
*
_interp
;
AST
::
UiObjectMember
*
_interestingMember
;
Interpreter
::
ObjectValue
*
_currentObjectValue
;
Interpreter
::
ObjectValue
*
_currentObjectValue
;
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qmljseditor/qmlcodecompletion.cpp
+
3
−
3
View file @
02ee76b8
...
@@ -96,6 +96,7 @@ static QIcon iconForColor(const QColor &color)
...
@@ -96,6 +96,7 @@ static QIcon iconForColor(const QColor &color)
}
}
#if 0
static QString qualifiedNameId(AST::UiQualifiedId *it)
static QString qualifiedNameId(AST::UiQualifiedId *it)
{
{
QString text;
QString text;
...
@@ -113,7 +114,6 @@ static QString qualifiedNameId(AST::UiQualifiedId *it)
...
@@ -113,7 +114,6 @@ static QString qualifiedNameId(AST::UiQualifiedId *it)
return text;
return text;
}
}
#if 0
static Interpreter::ObjectValue *newComponent(Interpreter::Engine *engine, const QString &name,
static Interpreter::ObjectValue *newComponent(Interpreter::Engine *engine, const QString &name,
const QHash<QString, Document::Ptr> &userComponents,
const QHash<QString, Document::Ptr> &userComponents,
QSet<QString> *processed)
QSet<QString> *processed)
...
@@ -821,8 +821,8 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
...
@@ -821,8 +821,8 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
scope->setProperty(QLatin1String("parent"), parentItem);
scope->setProperty(QLatin1String("parent"), parentItem);
#endif
#endif
Bind
bind
;
Bind
bind
(
&
interp
)
;
scope
=
bind
(
qmlDocument
,
snapshot
,
declaringMember
,
interp
);
scope
=
bind
(
qmlDocument
,
snapshot
,
declaringMember
);
}
}
// Search for the operator that triggered the completion.
// Search for the operator that triggered the completion.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment