diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-09 15:49:52 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-10-09 15:59:18 +0200 |
commit | 0a0d9690a90340c4bd6d9503dc78abee70ea4739 (patch) | |
tree | 0995f9514591cb4c63956013e0499d8199f5e439 | |
parent | 2b845c91756bcd0f5763752eccc254ca2b4a2cc0 (diff) |
Consistently use qint32 as IDs and counts in engine debugger
We should not sent unsigned numbers and read them as signed ones. The
invalid ID is -1, and it's good style to use types of fixed size for the
debug protocol.
Fixes: QTBUG-79114
Change-Id: Ib6754ad893cc01d3fe7aa7f76fbd732df36d969a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp | 41 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h | 3 | ||||
-rw-r--r-- | src/qmldebug/qqmlenginedebugclient.cpp | 130 | ||||
-rw-r--r-- | src/qmldebug/qqmlenginedebugclient_p.h | 90 | ||||
-rw-r--r-- | src/qmldebug/qqmlenginedebugclient_p_p.h | 2 |
5 files changed, 135 insertions, 131 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp index be83f63bfc..029004ffd1 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp @@ -490,7 +490,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) QQmlDebugPacket ds(message); QByteArray type; - int queryId; + qint32 queryId; ds >> type >> queryId; QQmlDebugPacket rs; @@ -503,13 +503,13 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) QJSEngine *engine = m_engines.at(ii); QString engineName = engine->objectName(); - int engineId = QQmlDebugService::idForObject(engine); + qint32 engineId = QQmlDebugService::idForObject(engine); rs << engineName << engineId; } } else if (type == "LIST_OBJECTS") { - int engineId = -1; + qint32 engineId = -1; ds >> engineId; QQmlEngine *engine = @@ -532,7 +532,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) } } else if (type == "FETCH_OBJECT") { - int objectId; + qint32 objectId; bool recurse; bool dumpProperties = true; @@ -550,8 +550,8 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) } else if (type == "FETCH_OBJECTS_FOR_LOCATION") { QString file; - int lineNumber; - int columnNumber; + qint32 lineNumber; + qint32 columnNumber; bool recurse; bool dumpProperties = true; @@ -569,7 +569,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) } } else if (type == "WATCH_OBJECT") { - int objectId; + qint32 objectId; ds >> objectId; bool ok = m_watch->addWatch(queryId, objectId); @@ -577,7 +577,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("WATCH_OBJECT_R") << queryId << ok; } else if (type == "WATCH_PROPERTY") { - int objectId; + qint32 objectId; QByteArray property; ds >> objectId >> property; @@ -586,7 +586,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("WATCH_PROPERTY_R") << queryId << ok; } else if (type == "WATCH_EXPR_OBJECT") { - int debugId; + qint32 debugId; QString expr; ds >> debugId >> expr; @@ -600,11 +600,11 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("NO_WATCH_R") << queryId << ok; } else if (type == "EVAL_EXPRESSION") { - int objectId; + qint32 objectId; QString expr; ds >> objectId >> expr; - int engineId = -1; + qint32 engineId = -1; if (!ds.atEnd()) ds >> engineId; @@ -632,12 +632,12 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("EVAL_EXPRESSION_R") << queryId << result; } else if (type == "SET_BINDING") { - int objectId; + qint32 objectId; QString propertyName; QVariant expr; bool isLiteralValue; QString filename; - int line; + qint32 line; ds >> objectId >> propertyName >> expr >> isLiteralValue >> filename >> line; bool ok = setBinding(objectId, propertyName, expr, isLiteralValue, @@ -646,7 +646,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("SET_BINDING_R") << queryId << ok; } else if (type == "RESET_BINDING") { - int objectId; + qint32 objectId; QString propertyName; ds >> objectId >> propertyName; bool ok = resetBinding(objectId, propertyName); @@ -654,7 +654,7 @@ void QQmlEngineDebugServiceImpl::processMessage(const QByteArray &message) rs << QByteArray("RESET_BINDING_R") << queryId << ok; } else if (type == "SET_METHOD_BODY") { - int objectId; + qint32 objectId; QString methodName; QString methodBody; ds >> objectId >> methodName >> methodBody; @@ -817,7 +817,8 @@ bool QQmlEngineDebugServiceImpl::setMethodBody(int objectId, const QString &meth return true; } -void QQmlEngineDebugServiceImpl::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value) +void QQmlEngineDebugServiceImpl::propertyChanged( + qint32 id, qint32 objectId, const QMetaProperty &property, const QVariant &value) { QQmlDebugPacket rs; rs << QByteArray("UPDATE_WATCH") << id << objectId << QByteArray(property.name()) << valueContents(value); @@ -848,14 +849,14 @@ void QQmlEngineDebugServiceImpl::objectCreated(QJSEngine *engine, QObject *objec if (!m_engines.contains(engine)) return; - int engineId = QQmlDebugService::idForObject(engine); - int objectId = QQmlDebugService::idForObject(object); - int parentId = QQmlDebugService::idForObject(object->parent()); + qint32 engineId = QQmlDebugService::idForObject(engine); + qint32 objectId = QQmlDebugService::idForObject(object); + qint32 parentId = QQmlDebugService::idForObject(object->parent()); QQmlDebugPacket rs; //unique queryId -1 - rs << QByteArray("OBJECT_CREATED") << -1 << engineId << objectId << parentId; + rs << QByteArray("OBJECT_CREATED") << qint32(-1) << engineId << objectId << parentId; emit messageToClient(name(), rs.data()); } diff --git a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h index c0c24058eb..741768cd00 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h +++ b/src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.h @@ -111,7 +111,8 @@ private: friend class QQmlDebuggerServiceFactory; void processMessage(const QByteArray &msg); - void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); + void propertyChanged(qint32 id, qint32 objectId, const QMetaProperty &property, + const QVariant &value); void prepareDeferredObjects(QObject *); void buildObjectList(QDataStream &, QQmlContext *, diff --git a/src/qmldebug/qqmlenginedebugclient.cpp b/src/qmldebug/qqmlenginedebugclient.cpp index 50f8deb087..0ca3f573d9 100644 --- a/src/qmldebug/qqmlenginedebugclient.cpp +++ b/src/qmldebug/qqmlenginedebugclient.cpp @@ -33,14 +33,14 @@ QT_BEGIN_NAMESPACE struct QQmlObjectData { QUrl url; - int lineNumber = -1; - int columnNumber = -1; + qint32 lineNumber = -1; + qint32 columnNumber = -1; QString idString; QString objectName; QString objectType; - int objectId = -1; - int contextId = -1; - int parentId = -1; + qint32 objectId = -1; + qint32 contextId = -1; + qint32 parentId = -1; }; QPacket &operator>>(QPacket &ds, QQmlObjectData &data) @@ -63,10 +63,10 @@ struct QQmlObjectProperty { QPacket &operator>>(QPacket &ds, QQmlObjectProperty &data) { - int type; + qint32 type; ds >> type >> data.name >> data.value >> data.valueTypeName >> data.binding >> data.hasNotifySignal; - data.type = (QQmlObjectProperty::Type)type; + data.type = QQmlObjectProperty::Type(type); return ds; } @@ -81,10 +81,10 @@ QQmlEngineDebugClientPrivate::QQmlEngineDebugClientPrivate(QQmlDebugConnection * } -quint32 QQmlEngineDebugClient::addWatch( +qint32 QQmlEngineDebugClient::addWatch( const QQmlEngineDebugPropertyReference &property, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -97,19 +97,19 @@ quint32 QQmlEngineDebugClient::addWatch( return id; } -quint32 QQmlEngineDebugClient::addWatch( +qint32 QQmlEngineDebugClient::addWatch( const QQmlEngineDebugContextReference &, const QString &, bool *success) { *success = false; qWarning("QQmlEngineDebugClient::addWatch(): Not implemented"); - return 0; + return -1; } -quint32 QQmlEngineDebugClient::addWatch( +qint32 QQmlEngineDebugClient::addWatch( const QQmlEngineDebugObjectReference &object, const QString &expr, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -121,10 +121,10 @@ quint32 QQmlEngineDebugClient::addWatch( return id; } -quint32 QQmlEngineDebugClient::addWatch( +qint32 QQmlEngineDebugClient::addWatch( const QQmlEngineDebugObjectReference &object, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -136,15 +136,15 @@ quint32 QQmlEngineDebugClient::addWatch( return id; } -quint32 QQmlEngineDebugClient::addWatch( +qint32 QQmlEngineDebugClient::addWatch( const QQmlEngineDebugFileReference &, bool *success) { *success = false; qWarning("QQmlEngineDebugClient::addWatch(): Not implemented"); - return 0; + return -1; } -void QQmlEngineDebugClient::removeWatch(quint32 id, bool *success) +void QQmlEngineDebugClient::removeWatch(qint32 id, bool *success) { *success = false; if (state() == QQmlDebugClient::Enabled) { @@ -155,11 +155,11 @@ void QQmlEngineDebugClient::removeWatch(quint32 id, bool *success) } } -quint32 QQmlEngineDebugClient::queryAvailableEngines(bool *success) +qint32 QQmlEngineDebugClient::queryAvailableEngines(bool *success) { Q_D(QQmlEngineDebugClient); d->engines.clear(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -171,12 +171,12 @@ quint32 QQmlEngineDebugClient::queryAvailableEngines(bool *success) return id; } -quint32 QQmlEngineDebugClient::queryRootContexts( +qint32 QQmlEngineDebugClient::queryRootContexts( const QQmlEngineDebugEngineReference &engine, bool *success) { Q_D(QQmlEngineDebugClient); d->rootContext = QQmlEngineDebugContextReference(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && engine.debugId != -1) { id = getId(); @@ -188,12 +188,12 @@ quint32 QQmlEngineDebugClient::queryRootContexts( return id; } -quint32 QQmlEngineDebugClient::queryObject( +qint32 QQmlEngineDebugClient::queryObject( const QQmlEngineDebugObjectReference &object, bool *success) { Q_D(QQmlEngineDebugClient); d->object = QQmlEngineDebugObjectReference(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && object.debugId != -1) { id = getId(); @@ -205,12 +205,12 @@ quint32 QQmlEngineDebugClient::queryObject( return id; } -quint32 QQmlEngineDebugClient::queryObjectsForLocation( - const QString &file, int lineNumber, int columnNumber, bool *success) +qint32 QQmlEngineDebugClient::queryObjectsForLocation( + const QString &file, qint32 lineNumber, qint32 columnNumber, bool *success) { Q_D(QQmlEngineDebugClient); d->objects.clear(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -223,12 +223,12 @@ quint32 QQmlEngineDebugClient::queryObjectsForLocation( return id; } -quint32 QQmlEngineDebugClient::queryObjectRecursive( +qint32 QQmlEngineDebugClient::queryObjectRecursive( const QQmlEngineDebugObjectReference &object, bool *success) { Q_D(QQmlEngineDebugClient); d->object = QQmlEngineDebugObjectReference(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && object.debugId != -1) { id = getId(); @@ -240,12 +240,12 @@ quint32 QQmlEngineDebugClient::queryObjectRecursive( return id; } -quint32 QQmlEngineDebugClient::queryObjectsForLocationRecursive(const QString &file, - int lineNumber, int columnNumber, bool *success) +qint32 QQmlEngineDebugClient::queryObjectsForLocationRecursive(const QString &file, + qint32 lineNumber, qint32 columnNumber, bool *success) { Q_D(QQmlEngineDebugClient); d->objects.clear(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -258,12 +258,12 @@ quint32 QQmlEngineDebugClient::queryObjectsForLocationRecursive(const QString &f return id; } -quint32 QQmlEngineDebugClient::queryExpressionResult( - int objectDebugId, const QString &expr, bool *success) +qint32 QQmlEngineDebugClient::queryExpressionResult( + qint32 objectDebugId, const QString &expr, bool *success) { Q_D(QQmlEngineDebugClient); d->exprResult = QVariant(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -276,12 +276,12 @@ quint32 QQmlEngineDebugClient::queryExpressionResult( return id; } -quint32 QQmlEngineDebugClient::queryExpressionResultBC( - int objectDebugId, const QString &expr, bool *success) +qint32 QQmlEngineDebugClient::queryExpressionResultBC( + qint32 objectDebugId, const QString &expr, bool *success) { Q_D(QQmlEngineDebugClient); d->exprResult = QVariant(); - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled) { id = getId(); @@ -293,15 +293,15 @@ quint32 QQmlEngineDebugClient::queryExpressionResultBC( return id; } -quint32 QQmlEngineDebugClient::setBindingForObject( - int objectDebugId, +qint32 QQmlEngineDebugClient::setBindingForObject( + qint32 objectDebugId, const QString &propertyName, const QVariant &bindingExpression, bool isLiteralValue, - const QString &source, int line, + const QString &source, qint32 line, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && objectDebugId != -1) { id = getId(); @@ -314,12 +314,12 @@ quint32 QQmlEngineDebugClient::setBindingForObject( return id; } -quint32 QQmlEngineDebugClient::resetBindingForObject( - int objectDebugId, +qint32 QQmlEngineDebugClient::resetBindingForObject( + qint32 objectDebugId, const QString &propertyName, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && objectDebugId != -1) { id = getId(); @@ -331,11 +331,11 @@ quint32 QQmlEngineDebugClient::resetBindingForObject( return id; } -quint32 QQmlEngineDebugClient::setMethodBody( - int objectDebugId, const QString &methodName, +qint32 QQmlEngineDebugClient::setMethodBody( + qint32 objectDebugId, const QString &methodName, const QString &methodBody, bool *success) { - quint32 id = -1; + qint32 id = -1; *success = false; if (state() == QQmlDebugClient::Enabled && objectDebugId != -1) { id = getId(); @@ -366,19 +366,19 @@ void QQmlEngineDebugClient::decode(QPacket &ds, if (simple) return; - int childCount; + qint32 childCount; bool recur; ds >> childCount >> recur; - for (int ii = 0; ii < childCount; ++ii) { + for (qint32 ii = 0; ii < childCount; ++ii) { o.children.append(QQmlEngineDebugObjectReference()); decode(ds, o.children.last(), !recur); } - int propCount; + qint32 propCount; ds >> propCount; - for (int ii = 0; ii < propCount; ++ii) { + for (qint32 ii = 0; ii < propCount; ++ii) { QQmlObjectProperty data; ds >> data; QQmlEngineDebugPropertyReference prop; @@ -414,9 +414,9 @@ void QQmlEngineDebugClient::decode(QPacket &ds, QList<QQmlEngineDebugObjectReference> &o, bool simple) { - int count; + qint32 count; ds >> count; - for (int i = 0; i < count; i++) { + for (qint32 i = 0; i < count; i++) { QQmlEngineDebugObjectReference obj; decode(ds, obj, simple); o << obj; @@ -464,18 +464,18 @@ void QQmlEngineDebugClient::decode(QPacket &ds, { ds >> c.name >> c.debugId; - int contextCount; + qint32 contextCount; ds >> contextCount; - for (int ii = 0; ii < contextCount; ++ii) { + for (qint32 ii = 0; ii < contextCount; ++ii) { c.contexts.append(QQmlEngineDebugContextReference()); decode(ds, c.contexts.last()); } - int objectCount; + qint32 objectCount; ds >> objectCount; - for (int ii = 0; ii < objectCount; ++ii) { + for (qint32 ii = 0; ii < objectCount; ++ii) { QQmlEngineDebugObjectReference obj; decode(ds, obj, true); @@ -490,18 +490,18 @@ void QQmlEngineDebugClient::messageReceived(const QByteArray &data) d->valid = false; QPacket ds(connection()->currentDataStreamVersion(), data); - int queryId; + qint32 queryId; QByteArray type; ds >> type >> queryId; //qDebug() << "QQmlEngineDebugPrivate::message()" << type; if (type == "LIST_ENGINES_R") { - int count; + qint32 count; ds >> count; d->engines.clear(); - for (int ii = 0; ii < count; ++ii) { + for (qint32 ii = 0; ii < count; ++ii) { QQmlEngineDebugEngineReference eng; ds >> eng.name; ds >> eng.debugId; @@ -532,7 +532,7 @@ void QQmlEngineDebugClient::messageReceived(const QByteArray &data) ds >> d->valid; } else if (type == "UPDATE_WATCH") { - int debugId; + qint32 debugId; QByteArray name; QVariant value; ds >> debugId >> name >> value; @@ -540,7 +540,9 @@ void QQmlEngineDebugClient::messageReceived(const QByteArray &data) return; } else if (type == "OBJECT_CREATED") { - int engineId, objectId, parentId; + qint32 engineId; + qint32 objectId; + qint32 parentId; ds >> engineId >> objectId >> parentId; emit newObject(objectId); return; @@ -557,7 +559,7 @@ void QQmlEngineDebugClient::messageReceived(const QByteArray &data) } -quint32 QQmlEngineDebugClient::getId() +qint32 QQmlEngineDebugClient::getId() { Q_D(QQmlEngineDebugClient); return d->nextId++; diff --git a/src/qmldebug/qqmlenginedebugclient_p.h b/src/qmldebug/qqmlenginedebugclient_p.h index 4a9cc3a020..0a01f2eac5 100644 --- a/src/qmldebug/qqmlenginedebugclient_p.h +++ b/src/qmldebug/qqmlenginedebugclient_p.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE struct QQmlEngineDebugPropertyReference { - int objectDebugId = -1; + qint32 objectDebugId = -1; QString name; QVariant value; QString valueTypeName; @@ -61,25 +61,25 @@ struct QQmlEngineDebugPropertyReference struct QQmlEngineDebugFileReference { QUrl url; - int lineNumber = -1; - int columnNumber = -1; + qint32 lineNumber = -1; + qint32 columnNumber = -1; }; struct QQmlEngineDebugObjectReference { - int debugId = -1; + qint32 debugId = -1; QString className; QString idString; QString name; QQmlEngineDebugFileReference source; - int contextDebugId = -1; + qint32 contextDebugId = -1; QList<QQmlEngineDebugPropertyReference> properties; QList<QQmlEngineDebugObjectReference> children; }; struct QQmlEngineDebugContextReference { - int debugId = -1; + qint32 debugId = -1; QString name; QList<QQmlEngineDebugObjectReference> objects; QList<QQmlEngineDebugContextReference> contexts; @@ -87,7 +87,7 @@ struct QQmlEngineDebugContextReference struct QQmlEngineDebugEngineReference { - int debugId = -1; + qint32 debugId = -1; QString name; }; @@ -100,46 +100,46 @@ class QQmlEngineDebugClient : public QQmlDebugClient public: explicit QQmlEngineDebugClient(QQmlDebugConnection *conn); - quint32 addWatch(const QQmlEngineDebugPropertyReference &, - bool *success); - quint32 addWatch(const QQmlEngineDebugContextReference &, const QString &, - bool *success); - quint32 addWatch(const QQmlEngineDebugObjectReference &, const QString &, - bool *success); - quint32 addWatch(const QQmlEngineDebugObjectReference &, - bool *success); - quint32 addWatch(const QQmlEngineDebugFileReference &, + qint32 addWatch(const QQmlEngineDebugPropertyReference &, + bool *success); + qint32 addWatch(const QQmlEngineDebugContextReference &, const QString &, + bool *success); + qint32 addWatch(const QQmlEngineDebugObjectReference &, const QString &, + bool *success); + qint32 addWatch(const QQmlEngineDebugObjectReference &, + bool *success); + qint32 addWatch(const QQmlEngineDebugFileReference &, bool *success); - void removeWatch(quint32 watch, bool *success); - - quint32 queryAvailableEngines(bool *success); - quint32 queryRootContexts(const QQmlEngineDebugEngineReference &, - bool *success); - quint32 queryObject(const QQmlEngineDebugObjectReference &, - bool *success); - quint32 queryObjectsForLocation(const QString &file, - int lineNumber, int columnNumber, bool *success); - quint32 queryObjectRecursive(const QQmlEngineDebugObjectReference &, + void removeWatch(qint32 watch, bool *success); + + qint32 queryAvailableEngines(bool *success); + qint32 queryRootContexts(const QQmlEngineDebugEngineReference &, + bool *success); + qint32 queryObject(const QQmlEngineDebugObjectReference &, + bool *success); + qint32 queryObjectsForLocation(const QString &file, + qint32 lineNumber, qint32 columnNumber, bool *success); + qint32 queryObjectRecursive(const QQmlEngineDebugObjectReference &, + bool *success); + qint32 queryObjectsForLocationRecursive(const QString &file, + qint32 lineNumber, qint32 columnNumber, bool *success); + qint32 queryExpressionResult(qint32 objectDebugId, + const QString &expr, + bool *success); + qint32 queryExpressionResultBC(qint32 objectDebugId, + const QString &expr, bool *success); - quint32 queryObjectsForLocationRecursive(const QString &file, - int lineNumber, int columnNumber, bool *success); - quint32 queryExpressionResult(int objectDebugId, - const QString &expr, - bool *success); - quint32 queryExpressionResultBC(int objectDebugId, - const QString &expr, - bool *success); - quint32 setBindingForObject(int objectDebugId, const QString &propertyName, - const QVariant &bindingExpression, - bool isLiteralValue, - const QString &source, int line, bool *success); - quint32 resetBindingForObject(int objectDebugId, - const QString &propertyName, bool *success); - quint32 setMethodBody(int objectDebugId, const QString &methodName, - const QString &methodBody, bool *success); - - quint32 getId(); + qint32 setBindingForObject(qint32 objectDebugId, const QString &propertyName, + const QVariant &bindingExpression, + bool isLiteralValue, + const QString &source, qint32 line, bool *success); + qint32 resetBindingForObject(qint32 objectDebugId, + const QString &propertyName, bool *success); + qint32 setMethodBody(qint32 objectDebugId, const QString &methodName, + const QString &methodBody, bool *success); + + qint32 getId(); void decode(QPacket &ds, QQmlEngineDebugContextReference &); void decode(QPacket &ds, QQmlEngineDebugObjectReference &, bool simple); @@ -153,7 +153,7 @@ public: bool valid() const; signals: - void newObject(int objectId); + void newObject(qint32 objectId); void valueChanged(QByteArray,QVariant); void result(); diff --git a/src/qmldebug/qqmlenginedebugclient_p_p.h b/src/qmldebug/qqmlenginedebugclient_p_p.h index 7c992ad3ab..b73da15e9d 100644 --- a/src/qmldebug/qqmlenginedebugclient_p_p.h +++ b/src/qmldebug/qqmlenginedebugclient_p_p.h @@ -62,7 +62,7 @@ class QQmlEngineDebugClientPrivate : public QQmlDebugClientPrivate public: QQmlEngineDebugClientPrivate(QQmlDebugConnection *connection); - quint32 nextId = 0; + qint32 nextId = 0; bool valid = false; QList<QQmlEngineDebugEngineReference> engines; QQmlEngineDebugContextReference rootContext; |