forked from qt-creator/qt-creator
QmlDesigner: Do not dispatch commands when already in destructor
On Linux destructing the local sockets leads to commands being dispatched synchronously. This is not expected and totally unrequired. When we shutdown the instance server no commands have to be dispatched anymore. Change-Id: Ieeca7ac2103e7b463137d76f85cd326888cc38ce Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -225,6 +225,8 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
|
||||
NodeInstanceServerProxy::~NodeInstanceServerProxy()
|
||||
{
|
||||
m_destructing = true;
|
||||
|
||||
disconnect(this, SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||
|
||||
writeCommand(QVariant::fromValue(EndPuppetCommand()));
|
||||
@@ -273,6 +275,9 @@ void NodeInstanceServerProxy::dispatchCommand(const QVariant &command, PuppetStr
|
||||
static const int debugOutputCommandType = QMetaType::type("DebugOutputCommand");
|
||||
static const int puppetAliveCommandType = QMetaType::type("PuppetAliveCommand");
|
||||
|
||||
if (m_destructing)
|
||||
return;
|
||||
|
||||
qCInfo(instanceViewBenchmark) << "dispatching command" << command.userType() << command.typeName();
|
||||
if (command.userType() == informationChangedCommandType) {
|
||||
nodeInstanceClient()->informationChanged(command.value<InformationChangedCommand>());
|
||||
|
@@ -128,6 +128,7 @@ private:
|
||||
RunModus m_runModus;
|
||||
int m_synchronizeId = -1;
|
||||
QTime m_benchmarkTimer;
|
||||
bool m_destructing = false;
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
Reference in New Issue
Block a user