1
0
Fork 0

Remote-canvas logging cleanups

This commit is contained in:
James Turner 2018-09-26 23:54:16 +01:00
parent 28629b65f2
commit c15d65692a
2 changed files with 11 additions and 4 deletions

View file

@ -207,6 +207,7 @@ void CanvasConnection::onTextMessageReceived(QString message)
if (json.isObject()) {
// process new nodes
QJsonArray created = json.object().value("created").toArray();
qInfo() << "new nodes:" << created.size();
Q_FOREACH (QJsonValue v, created) {
QJsonObject newProp = v.toObject();
@ -278,7 +279,10 @@ void CanvasConnection::onTextMessageReceived(QString message)
void CanvasConnection::onWebSocketClosed()
{
qDebug() << "saw web-socket closed";
if ((m_status == Connected) || (m_status == Connected)) {
qDebug() << "saw web-socket closed";
}
m_localPropertyRoot.reset();
idPropertyDict.clear();

View file

@ -83,7 +83,7 @@ void CanvasPaintedDisplay::setCanvas(CanvasConnection *canvas)
void CanvasPaintedDisplay::onConnectionDestroyed()
{
qDebug() << "saw connection destroyed";
qDebug() << Q_FUNC_INFO << "saw connection destroyed";
m_connection = nullptr;
delete m_rootElement;
@ -97,8 +97,11 @@ void CanvasPaintedDisplay::onConnectionStatusChanged()
{
buildElements();
} else {
qDebug() << Q_FUNC_INFO << "clearing root element";
delete m_rootElement;
if (m_rootElement) {
qDebug() << Q_FUNC_INFO << "clearing root element";
delete m_rootElement;
m_rootElement.clear();
}
update();
}
}