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
63ad7ecd
Commit
63ad7ecd
authored
Jan 06, 2011
by
Marco Bubke
Browse files
QmlDesigner.NodeInstances: Blocking updates not needed anymore
parent
69265615
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmldesigner/designercore/include/nodeinstanceserverinterface.h
View file @
63ad7ecd
...
...
@@ -43,8 +43,6 @@ public:
virtual
void
addImport
(
const
AddImportCommand
&
command
)
=
0
;
virtual
void
completeComponent
(
const
CompleteComponentCommand
&
command
)
=
0
;
virtual
void
setBlockUpdates
(
bool
/*block*/
)
{}
static
void
registerCommands
();
};
...
...
src/plugins/qmldesigner/designercore/include/nodeinstanceview.h
View file @
63ad7ecd
...
...
@@ -112,8 +112,6 @@ public:
QRectF
sceneRect
()
const
;
void
setBlockUpdates
(
bool
block
);
NodeInstance
activeStateInstance
()
const
;
void
activateState
(
const
NodeInstance
&
instance
);
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.cpp
View file @
63ad7ecd
...
...
@@ -103,11 +103,6 @@ NodeInstanceClientInterface *NodeInstanceServerProxy::nodeInstanceClient() const
return
m_nodeInstanceView
.
data
();
}
void
NodeInstanceServerProxy
::
setBlockUpdates
(
bool
block
)
{
m_socket
->
blockSignals
(
block
);
}
void
NodeInstanceServerProxy
::
writeCommand
(
const
QVariant
&
command
)
{
Q_ASSERT
(
m_socket
.
data
());
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceserverproxy.h
View file @
63ad7ecd
...
...
@@ -39,8 +39,6 @@ public:
void
addImport
(
const
AddImportCommand
&
command
);
void
completeComponent
(
const
CompleteComponentCommand
&
command
);
void
setBlockUpdates
(
bool
block
);
protected:
void
writeCommand
(
const
QVariant
&
command
);
void
dispatchCommand
(
const
QVariant
&
command
);
...
...
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
View file @
63ad7ecd
...
...
@@ -142,11 +142,7 @@ void NodeInstanceView::modelAttached(Model *model)
m_nodeInstanceServer
=
new
NodeInstanceServerProxy
(
this
);
connect
(
m_nodeInstanceServer
.
data
(),
SIGNAL
(
processCrashed
()),
this
,
SLOT
(
restartProcess
()));
setBlockUpdates
(
true
);
nodeInstanceServer
()
->
createScene
(
createCreateSceneCommand
());
setBlockUpdates
(
false
);
}
void
NodeInstanceView
::
modelAboutToBeDetached
(
Model
*
model
)
...
...
@@ -160,8 +156,6 @@ void NodeInstanceView::modelAboutToBeDetached(Model * model)
void
NodeInstanceView
::
restartProcess
()
{
setBlockUpdates
(
true
);
if
(
model
())
{
delete
nodeInstanceServer
();
...
...
@@ -170,8 +164,6 @@ void NodeInstanceView::restartProcess()
nodeInstanceServer
()
->
createScene
(
createCreateSceneCommand
());
}
setBlockUpdates
(
false
);
}
/*! \brief Notifing the view that a node was created.
...
...
@@ -556,18 +548,6 @@ void NodeInstanceView::removeInstanceNodeRelationship(const ModelNode &node)
instance
.
makeInvalid
();
}
void
NodeInstanceView
::
setBlockUpdates
(
bool
block
)
{
if
(
m_blockUpdates
==
0
&&
block
==
true
)
m_nodeInstanceServer
->
setBlockUpdates
(
true
);
if
(
block
)
{
m_blockUpdates
++
;
}
else
if
(
m_blockUpdates
>
0
)
{
m_blockUpdates
--
;
}
}
void
NodeInstanceView
::
setStateInstance
(
const
NodeInstance
&
stateInstance
)
{
m_activeStateInstance
=
stateInstance
;
...
...
Write
Preview
Markdown
is supported
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