Skip to content
GitLab
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
48ff3f7a
Commit
48ff3f7a
authored
Sep 23, 2010
by
Thomas Hartmann
Browse files
QmlDesigner.NodeInstances: Fix id getter
Add getter for id in node instances.
parent
1a9bd5b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/include/nodeinstance.h
View file @
48ff3f7a
...
...
@@ -141,6 +141,8 @@ public:
static
void
registerDeclarativeTypes
();
QString
id
()
const
;
#ifdef QTCREATOR_TEST
QObject
*
testHandle
()
const
;
Internal
::
ObjectNodeInstance
*
internalInstance
()
const
;
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
View file @
48ff3f7a
...
...
@@ -644,6 +644,11 @@ void NodeInstance::registerDeclarativeTypes()
// qmlRegisterType<QmlDesigner::Internal::QmlPropertyChangesObject>();
}
QString
NodeInstance
::
id
()
const
{
return
m_nodeInstance
->
id
();
}
#ifdef QTCREATOR_TEST
QObject
*
NodeInstance
::
testHandle
()
const
{
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
View file @
48ff3f7a
...
...
@@ -699,8 +699,8 @@ void NodeInstanceView::removeIdFromContext(QObject *object)
{
if
(
hasInstanceForObject
(
object
))
{
NodeInstance
instance
=
instanceForObject
(
object
);
if
(
instance
.
i
nternalInstance
())
{
QString
id
=
instance
.
internalInstance
()
->
id
();
if
(
instance
.
i
sValid
())
{
QString
id
=
instance
.
id
();
if
(
!
id
.
isEmpty
())
engine
()
->
rootContext
()
->
setContextProperty
(
id
,
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment