QmlProfiler: show warning when no observer is present

Task-number: QTCREATORBUG-5536
Change-Id: I2cd1e62f78af3b1b18a3e318ad29ee0343c48b29
Reviewed-on: http://codereview.qt.nokia.com/1930
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Christiaan Janssen
2011-07-21 10:42:34 +02:00
parent ed5030f124
commit 409ed3b275

View File

@@ -46,6 +46,7 @@
#include <utils/qtcassert.h>
#include <coreplugin/helpmanager.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
#include <qmlprojectmanager/qmlprojectplugin.h>
#include <projectexplorer/localapplicationruncontrol.h>
#include <projectexplorer/applicationrunconfiguration.h>
#include <qt4projectmanager/qt-s60/s60devicedebugruncontrol.h>
@@ -144,6 +145,15 @@ QmlProfilerEngine::~QmlProfilerEngine()
void QmlProfilerEngine::start()
{
QTC_ASSERT(!d->m_runner, return);
if (QmlProjectManager::QmlProjectRunConfiguration *rc =
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration())) {
if (rc->observerPath().isEmpty()) {
QmlProjectManager::QmlProjectPlugin::showQmlObserverToolWarning();
return;
}
}
d->m_runner = QmlProfilerEnginePrivate::createRunner(runConfiguration(), this);