Commit 12f5bbcc authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Guess the trace end time if we don't receive EndTrace



Task-number: QTCREATORBUG-11952
Change-Id: Ie55b616a1fc54e0cccac5560ec66fb7cc496c8e2
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent d8adc10f
......@@ -186,7 +186,7 @@ void QmlProfilerTraceClient::messageReceived(const QByteArray &data)
d->maximumTime = qMax(time, d->maximumTime);
}
} else if (messageType == Complete) {
emit complete();
emit complete(d->maximumTime);
} else if (messageType == SceneGraphFrame) {
int sgEventType;
int count = 0;
......
......@@ -97,7 +97,7 @@ public slots:
void sendRecordingStatus();
signals:
void complete();
void complete(qint64 maximumTime);
void gap(qint64 time);
void event(int event, qint64 time);
void traceFinished( qint64 time );
......
......@@ -172,8 +172,8 @@ void QmlProfilerClientManager::connectClientSignals()
{
QTC_ASSERT(d->profilerState, return);
if (d->qmlclientplugin) {
connect(d->qmlclientplugin.data(), SIGNAL(complete()),
this, SLOT(qmlComplete()));
connect(d->qmlclientplugin.data(), SIGNAL(complete(qint64)),
this, SLOT(qmlComplete(qint64)));
connect(d->qmlclientplugin.data(),
SIGNAL(rangedEvent(int,int,qint64,qint64,QStringList,QmlDebug::QmlEventLocation,
qint64,qint64,qint64,qint64,qint64)),
......@@ -354,8 +354,10 @@ void QmlProfilerClientManager::retryMessageBoxFinished(int result)
}
}
void QmlProfilerClientManager::qmlComplete()
void QmlProfilerClientManager::qmlComplete(qint64 maximumTime)
{
if (maximumTime > d->modelManager->traceTime()->endTime())
d->modelManager->traceTime()->setEndTime(maximumTime);
d->qmlDataReady = true;
if (!d->v8clientplugin || d->v8clientplugin.data()->status() != QmlDebug::Enabled || d->v8DataReady) {
emit dataReadyForProcessing();
......
......@@ -72,7 +72,7 @@ private slots:
void connectionStateChanged();
void retryMessageBoxFinished(int result);
void qmlComplete();
void qmlComplete(qint64 maximumTime);
void v8Complete();
void profilerStateChanged();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment