QmlProfiler: display warning when app killed

Change-Id: I2183e02a5ce4b266702d0771933bda61efa66e95
Reviewed-on: http://codereview.qt.nokia.com/1603
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-07-13 14:47:34 +02:00
committed by Aurindam Jana
parent b533cea366
commit 82ff204314
5 changed files with 30 additions and 3 deletions

View File

@@ -217,6 +217,7 @@ IAnalyzerEngine *QmlProfilerTool::createEngine(const AnalyzerStartParameters &sp
connect(engine, SIGNAL(processRunning(int)), this, SLOT(connectClient(int)));
connect(engine, SIGNAL(finished()), this, SLOT(disconnectClient()));
connect(engine, SIGNAL(finished()), this, SLOT(correctTimer()));
connect(engine, SIGNAL(stopRecording()), this, SLOT(stopRecording()));
connect(d->m_traceWindow, SIGNAL(viewUpdated()), engine, SLOT(dataReceived()));
connect(this, SIGNAL(connectionFailed()), engine, SLOT(finishProcess()));
@@ -335,8 +336,9 @@ QWidget *QmlProfilerTool::createWidgets()
palette.setColor(QPalette::WindowText, Qt::white);
timeLabel->setPalette(palette);
timeLabel->setIndent(10);
connect(d->m_traceWindow, SIGNAL(viewUpdated()), this, SLOT(correctTimer()));
connect(this, SIGNAL(setTimeLabel(QString)), timeLabel, SLOT(setText(QString)));
correctTimer();
layout->addWidget(timeLabel);
toolbarWidget->setLayout(layout);
@@ -432,6 +434,11 @@ void QmlProfilerTool::gotoSourceLocation(const QString &fileUrl, int lineNumber)
}
}
void QmlProfilerTool::correctTimer() {
if (d->m_statistics->eventCount() == 0)
updateTimer(0);
}
void QmlProfilerTool::updateTimer(qreal elapsedSeconds)
{
QString timeString = QString::number(elapsedSeconds,'f',1);