forked from qt-creator/qt-creator
QmlDesigner: Implement debugOutput
Change-Id: I081866dcba41a8cbed1243dd9e235aca5c30beee Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
committed by
Thomas Hartmann
parent
c64657da22
commit
9b4512f906
@@ -157,6 +157,7 @@ public:
|
||||
|
||||
signals:
|
||||
void qmlPuppetCrashed();
|
||||
void qmlPuppetError(const QString &errorMessage);
|
||||
|
||||
private: // functions
|
||||
void activateState(const NodeInstance &instance);
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
#include "componentcompletedcommand.h"
|
||||
#include "tokencommand.h"
|
||||
#include "removesharedmemorycommand.h"
|
||||
#include "debugoutputcommand.h"
|
||||
|
||||
#include "nodeinstanceserverproxy.h"
|
||||
|
||||
@@ -1285,8 +1286,23 @@ void NodeInstanceView::token(const TokenCommand &command)
|
||||
emitInstanceToken(command.tokenName(), command.tokenNumber(), nodeVector);
|
||||
}
|
||||
|
||||
void NodeInstanceView::debugOutput(const DebugOutputCommand & /*command*/)
|
||||
void NodeInstanceView::debugOutput(const DebugOutputCommand & command)
|
||||
{
|
||||
if (command.instanceIds().isEmpty()) {
|
||||
qmlPuppetError(command.text()); // TODO: connect that somewhere to show that to the user
|
||||
} else {
|
||||
QVector<qint32> instanceIdsWithChangedErrors;
|
||||
foreach (qint32 instanceId, command.instanceIds()) {
|
||||
NodeInstance instance = instanceForId(instanceId);
|
||||
if (instance.isValid()) {
|
||||
if (instance.setError(command.text()))
|
||||
instanceIdsWithChangedErrors.append(instanceId);
|
||||
} else {
|
||||
qmlPuppetError(command.text()); // TODO: connect that somewhere to show that to the user
|
||||
}
|
||||
}
|
||||
emitInstanceErrorChange(instanceIdsWithChangedErrors);
|
||||
}
|
||||
}
|
||||
|
||||
void NodeInstanceView::sendToken(const QString &token, int number, const QVector<ModelNode> &nodeVector)
|
||||
|
||||
Reference in New Issue
Block a user