forked from qt-creator/qt-creator
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:
committed by
Aurindam Jana
parent
b533cea366
commit
82ff204314
@@ -173,6 +173,19 @@ void QmlProfilerEngine::stop()
|
||||
|
||||
void QmlProfilerEngine::stopped()
|
||||
{
|
||||
// user feedback
|
||||
if (d->m_running && d->m_fetchingData) {
|
||||
Core::ICore * const core = Core::ICore::instance();
|
||||
QMessageBox *killedWarning = new QMessageBox(core->mainWindow());
|
||||
killedWarning->setIcon(QMessageBox::Warning);
|
||||
killedWarning->setWindowTitle(tr("QML Profiler"));
|
||||
killedWarning->setText(tr("Application finished before loading profiled data.\n Please use the stop button instead."));
|
||||
killedWarning->setStandardButtons(QMessageBox::Ok);
|
||||
killedWarning->setDefaultButton(QMessageBox::Ok);
|
||||
killedWarning->setModal(false);
|
||||
killedWarning->show();
|
||||
}
|
||||
|
||||
d->m_running = false;
|
||||
AnalyzerManager::stopTool(); // FIXME: Needed?
|
||||
emit finished();
|
||||
|
||||
Reference in New Issue
Block a user