QmlProfiler: Warn user if Qt is too old

Check for the Qt version in teh active build configuration. If
it's too old warn the user that we require 4.7.4.

(The app running doesn't necessarily have to have the same Qt version,
so this is just an approximation).

Change-Id: Id1f31e4f0734448712dd48ecf6526ca89da45b8b
Reviewed-on: http://codereview.qt.nokia.com/460
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Kai Koehne
2011-06-10 17:09:45 +02:00
committed by Christiaan Janssen
parent 17db97b698
commit 5fb18dcc83
2 changed files with 30 additions and 1 deletions

View File

@@ -75,6 +75,9 @@ AnalyzerRunControl::AnalyzerRunControl(const AnalyzerStartParameters &sp,
IAnalyzerTool *tool = AnalyzerManager::instance()->currentTool();
d->m_engine = tool->createEngine(sp, runConfiguration);
if (!d->m_engine)
return;
connect(d->m_engine, SIGNAL(outputReceived(QString,Utils::OutputFormat)),
SLOT(receiveOutput(QString,Utils::OutputFormat)));
connect(d->m_engine, SIGNAL(taskToBeAdded(ProjectExplorer::Task::TaskType,QString,QString,int)),
@@ -94,6 +97,11 @@ AnalyzerRunControl::~AnalyzerRunControl()
void AnalyzerRunControl::start()
{
if (!d->m_engine) {
emit finished();
return;
}
// clear about-to-be-outdated tasks
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
ProjectExplorer::TaskHub *hub = pm->getObject<ProjectExplorer::TaskHub>();
@@ -106,7 +114,7 @@ void AnalyzerRunControl::start()
ProjectExplorer::RunControl::StopResult AnalyzerRunControl::stop()
{
if (!d->m_isRunning)
if (!d->m_engine || !d->m_isRunning)
return StoppedSynchronously;
d->m_engine->stop();
@@ -127,6 +135,8 @@ bool AnalyzerRunControl::isRunning() const
QString AnalyzerRunControl::displayName() const
{
if (!d->m_engine)
return QString();
return d->m_engine->startParameters().displayName;
}