forked from qt-creator/qt-creator
QmlProfiler: Debug messages are no QML events ...
In particular, they can also occur if we're not AcquiringData. Change-Id: Ia310206ee15973fc5b2fa1c607d7c9a48b6f435f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -157,10 +157,8 @@ void QmlProfilerTraceClient::setRequestedFeatures(quint64 features)
|
||||
connect(d->messageClient.data(), &QDebugMessageClient::message, this, [this](QtMsgType type,
|
||||
const QString &text, const QmlDebug::QDebugContextInfo &context)
|
||||
{
|
||||
emit this->rangedEvent(QmlDebug::DebugMessage, QmlDebug::MaximumRangeType,
|
||||
type, context.timestamp, 0, text,
|
||||
QmlDebug::QmlEventLocation(context.file, context.line, 1), 0, 0,
|
||||
0, 0, 0);
|
||||
emit debugMessage(type, context.timestamp, text,
|
||||
QmlDebug::QmlEventLocation(context.file, context.line, 1));
|
||||
});
|
||||
} else {
|
||||
d->messageClient.reset();
|
||||
|
@@ -73,6 +73,8 @@ signals:
|
||||
qint64 length, const QString &data,
|
||||
const QmlDebug::QmlEventLocation &location, qint64 param1, qint64 param2,
|
||||
qint64 param3, qint64 param4, qint64 param5);
|
||||
void debugMessage(QtMsgType type, qint64 timestamp, const QString &text,
|
||||
const QmlDebug::QmlEventLocation &location);
|
||||
void recordingChanged(bool arg);
|
||||
void recordedFeaturesChanged(quint64 features);
|
||||
|
||||
|
@@ -187,6 +187,8 @@ void QmlProfilerClientManager::connectClientSignals()
|
||||
this, &QmlProfilerClientManager::qmlComplete);
|
||||
connect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::rangedEvent,
|
||||
d->modelManager, &QmlProfilerModelManager::addQmlEvent);
|
||||
connect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::debugMessage,
|
||||
d->modelManager, &QmlProfilerModelManager::addDebugMessage);
|
||||
connect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::traceFinished,
|
||||
d->modelManager->traceTime(), &QmlProfilerTraceTime::increaseEndTime);
|
||||
connect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::traceStarted,
|
||||
@@ -209,6 +211,8 @@ void QmlProfilerClientManager::disconnectClientSignals()
|
||||
this, &QmlProfilerClientManager::qmlComplete);
|
||||
disconnect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::rangedEvent,
|
||||
d->modelManager, &QmlProfilerModelManager::addQmlEvent);
|
||||
disconnect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::debugMessage,
|
||||
d->modelManager, &QmlProfilerModelManager::addDebugMessage);
|
||||
disconnect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::traceFinished,
|
||||
d->modelManager->traceTime(), &QmlProfilerTraceTime::increaseEndTime);
|
||||
disconnect(d->qmlclientplugin.data(), &QmlProfilerTraceClient::traceStarted,
|
||||
|
@@ -296,6 +296,14 @@ void QmlProfilerModelManager::addQmlEvent(QmlDebug::Message message,
|
||||
ndata1, ndata2, ndata3, ndata4, ndata5);
|
||||
}
|
||||
|
||||
void QmlProfilerModelManager::addDebugMessage(QtMsgType type, qint64 timestamp, const QString &text,
|
||||
const QmlDebug::QmlEventLocation &location)
|
||||
{
|
||||
if (state() == AcquiringData)
|
||||
d->model->addQmlEvent(QmlDebug::DebugMessage, QmlDebug::MaximumRangeType, type, timestamp,
|
||||
0, text, location, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void QmlProfilerModelManager::acquiringDone()
|
||||
{
|
||||
QTC_ASSERT(state() == AcquiringData, /**/);
|
||||
|
@@ -135,6 +135,8 @@ public slots:
|
||||
qint64 startTime, qint64 length, const QString &data,
|
||||
const QmlDebug::QmlEventLocation &location,
|
||||
qint64 ndata1, qint64 ndata2, qint64 ndata3, qint64 ndata4, qint64 ndata5);
|
||||
void addDebugMessage(QtMsgType type, qint64 timestamp, const QString &text,
|
||||
const QmlDebug::QmlEventLocation &location);
|
||||
|
||||
void save(const QString &filename);
|
||||
void load(const QString &filename);
|
||||
|
Reference in New Issue
Block a user