diff options
Diffstat (limited to 'src/declarative/debugger')
7 files changed, 41 insertions, 41 deletions
diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index 9a5bdea2..21c138dd 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -217,7 +217,7 @@ QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() { } -QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, +QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, QDeclarativeDebugConnection *parent) : QObject(*(new QDeclarativeDebugClientPrivate), parent) { diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index bf400f72..80dd2332 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -94,13 +94,13 @@ QDeclarativeDebugService::Status QDeclarativeDebugService::status() const namespace { - struct ObjectReference + struct ObjectReference { QPointer<QObject> object; int id; }; - struct ObjectReferenceHash + struct ObjectReferenceHash { ObjectReferenceHash() : nextId(0) {} @@ -124,7 +124,7 @@ int QDeclarativeDebugService::idForObject(QObject *object) return -1; ObjectReferenceHash *hash = objectReferenceHash(); - QHash<QObject *, ObjectReference>::Iterator iter = + QHash<QObject *, ObjectReference>::Iterator iter = hash->objects.find(object); if (iter == hash->objects.end()) { @@ -142,7 +142,7 @@ int QDeclarativeDebugService::idForObject(QObject *object) hash->ids.insert(id, object); iter->object = object; iter->id = id; - } + } return iter->id; } @@ -160,7 +160,7 @@ QObject *QDeclarativeDebugService::objectForId(int id) return 0; - QHash<QObject *, ObjectReference>::Iterator objIter = + QHash<QObject *, ObjectReference>::Iterator objIter = hash->objects.find(*iter); Q_ASSERT(objIter != hash->objects.end()); @@ -193,7 +193,7 @@ QString QDeclarativeDebugService::objectToString(QObject *obj) if(objectName.isEmpty()) objectName = QLatin1String("<unnamed>"); - QString rv = QString::fromUtf8(obj->metaObject()->className()) + + QString rv = QString::fromUtf8(obj->metaObject()->className()) + QLatin1String(": ") + objectName; return rv; diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index 6ca660b5..9bba4a4d 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -137,19 +137,19 @@ QDeclarativeDebugTrace::QDeclarativeDebugTrace() void QDeclarativeDebugTrace::addEvent(EventType t) { - if (QDeclarativeDebugService::isDebuggingEnabled()) + if (QDeclarativeDebugService::isDebuggingEnabled()) traceInstance()->addEventImpl(t); } void QDeclarativeDebugTrace::startRange(RangeType t) { - if (QDeclarativeDebugService::isDebuggingEnabled()) + if (QDeclarativeDebugService::isDebuggingEnabled()) traceInstance()->startRangeImpl(t); } void QDeclarativeDebugTrace::rangeData(RangeType t, const QString &data) { - if (QDeclarativeDebugService::isDebuggingEnabled()) + if (QDeclarativeDebugService::isDebuggingEnabled()) traceInstance()->rangeDataImpl(t, data); } @@ -173,7 +173,7 @@ void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QUrl &fileName, in void QDeclarativeDebugTrace::endRange(RangeType t) { - if (QDeclarativeDebugService::isDebuggingEnabled()) + if (QDeclarativeDebugService::isDebuggingEnabled()) traceInstance()->endRangeImpl(t); } diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp index 083fca1a..b6510945 100644 --- a/src/declarative/debugger/qdeclarativeenginedebug.cpp +++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp @@ -172,7 +172,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara } } -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugRootContextQuery *q) { if (c && q) { @@ -336,7 +336,7 @@ void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) return; rootContextQuery.remove(queryId); - if (!ds.atEnd()) + if (!ds.atEnd()) decode(ds, query->m_context); query->m_client = 0; @@ -516,7 +516,7 @@ void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) watch->m_client = 0; watch->setState(QDeclarativeDebugWatch::Inactive); - + d->watched.remove(watch->queryId()); if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { @@ -584,7 +584,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclar QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() << false << true; d->client->sendMessage(message); } else { @@ -607,7 +607,7 @@ QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(cons QByteArray message; QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() << true << true; d->client->sendMessage(message); } else { @@ -777,7 +777,7 @@ QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent) QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery() { - if (m_client && m_queryId != -1) + if (m_client && m_queryId != -1) QDeclarativeEngineDebugPrivate::remove(m_client, this); } @@ -793,7 +793,7 @@ QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *pa QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery() { - if (m_client && m_queryId != -1) + if (m_client && m_queryId != -1) QDeclarativeEngineDebugPrivate::remove(m_client, this); } @@ -809,7 +809,7 @@ QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent) QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery() { - if (m_client && m_queryId != -1) + if (m_client && m_queryId != -1) QDeclarativeEngineDebugPrivate::remove(m_client, this); } @@ -825,7 +825,7 @@ QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *pare QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery() { - if (m_client && m_queryId != -1) + if (m_client && m_queryId != -1) QDeclarativeEngineDebugPrivate::remove(m_client, this); } @@ -974,7 +974,7 @@ QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDecl QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o) { - m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; + m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; m_contexts = o.m_contexts; return *this; } diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h index c16dddf5..ac7e63d3 100644 --- a/src/declarative/debugger/qdeclarativeenginedebug_p.h +++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h @@ -91,11 +91,11 @@ public: QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0); QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &, QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, + QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, + QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, QObject *parent = 0); - QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, + QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent = 0); bool setBindingForObject(int objectDebugId, const QString &propertyName, diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp index 5ee064a2..f4b66dc3 100644 --- a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp @@ -74,7 +74,7 @@ QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent) this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant))); } -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const QDeclarativeEngineDebugService::QDeclarativeObjectData &data) { ds << data.url << data.lineNumber << data.columnNumber << data.idString @@ -83,7 +83,7 @@ QDataStream &operator<<(QDataStream &ds, return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, QDeclarativeEngineDebugService::QDeclarativeObjectData &data) { ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString @@ -92,7 +92,7 @@ QDataStream &operator>>(QDataStream &ds, return ds; } -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) { ds << (int)data.type << data.name << data.value << data.valueTypeName @@ -100,7 +100,7 @@ QDataStream &operator<<(QDataStream &ds, return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) { int type; @@ -144,7 +144,7 @@ QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx) rv.valueTypeName = QString::fromUtf8(prop.typeName()); rv.name = QString::fromUtf8(prop.name()); rv.hasNotifySignal = prop.hasNotifySignal(); - QDeclarativeAbstractBinding *binding = + QDeclarativeAbstractBinding *binding = QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name)); if (binding) rv.binding = binding->expression(); @@ -213,7 +213,7 @@ void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, message << objectData(object); QObjectList children = object->children(); - + int childrenCount = children.count(); for (int ii = 0; ii < children.count(); ++ii) { if (qobject_cast<QDeclarativeContext*>(children[ii]) || QDeclarativeBoundSignal::cast(children[ii])) @@ -302,7 +302,7 @@ void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDecl QString ctxtName = ctxt->objectName(); int ctxtId = QDeclarativeDebugService::idForObject(ctxt); - message << ctxtName << ctxtId; + message << ctxtName << ctxtId; int count = 0; @@ -433,7 +433,7 @@ void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message) int engineId = -1; ds >> engineId; - QDeclarativeEngine *engine = + QDeclarativeEngine *engine = qobject_cast<QDeclarativeEngine *>(QDeclarativeDebugService::objectForId(engineId)); rs << QByteArray("LIST_OBJECTS_R") << queryId; @@ -678,7 +678,7 @@ void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString & return; QDeclarativePropertyCache::Data dummy; - QDeclarativePropertyCache::Data *prop = + QDeclarativePropertyCache::Data *prop = QDeclarativePropertyCache::property(context->engine(), object, method, dummy); if (!prop || !(prop->flags & QDeclarativePropertyCache::Data::IsVMEFunction)) @@ -693,12 +693,12 @@ void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString & paramStr.append(QString::fromUtf8(paramNames.at(ii))); } - QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr + + QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr + QLatin1String(") {"); jsfunction += body; jsfunction += QLatin1String("\n})"); - QDeclarativeVMEMetaObject *vmeMetaObject = + QDeclarativeVMEMetaObject *vmeMetaObject = static_cast<QDeclarativeVMEMetaObject*>(QObjectPrivate::get(object)->metaObject); Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index 369f0610..8bb2a129 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE \brief The QPacketProtocol class encapsulates communicating discrete packets across fragmented IO channels, such as TCP sockets. - QPacketProtocol makes it simple to send arbitrary sized data "packets" across + QPacketProtocol makes it simple to send arbitrary sized data "packets" across fragmented transports such as TCP and UDP. As transmission boundaries are not respected, sending packets over protocols @@ -243,8 +243,8 @@ QPacketProtocol::~QPacketProtocol() /*! Returns the maximum packet size allowed. By default this is - 2,147,483,647 bytes. - + 2,147,483,647 bytes. + If a packet claiming to be larger than the maximum packet size is received, the QPacketProtocol::invalidPacket() signal is emitted. @@ -274,7 +274,7 @@ qint32 QPacketProtocol::setMaximumPacketSize(qint32 max) protocol.send() << "Hello world" << 123; \endcode - will send a packet containing "Hello world" and 123. To construct more + will send a packet containing "Hello world" and 123. To construct more complex packets, explicitly construct a QPacket instance. */ QPacketAutoSend QPacketProtocol::send() @@ -441,8 +441,8 @@ QIODevice * QPacketProtocol::device() \endcode Only packets returned from QPacketProtocol::read() may be read from. QPacket - instances constructed by directly by applications are for transmission only - and are considered "write only". Attempting to read data from them will + instances constructed by directly by applications are for transmission only + and are considered "write only". Attempting to read data from them will result in undefined behavior. \ingroup io |