QmlProfiler: Don't use the model factory if it doesn't exist

The model factory only exists if there is a plugin providing it. Also,
it's a good idea to initialize it.

Change-Id: I904bae1e733c37699a99e84e79c67ab4e8aea805
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2014-11-27 10:36:58 +01:00
parent 2d58001d86
commit 13c7d1c2ce
2 changed files with 5 additions and 2 deletions

View File

@@ -105,7 +105,10 @@ ExtensionSystem::IPlugin::ShutdownFlag QmlProfilerPlugin::aboutToShutdown()
QList<QmlProfilerTimelineModel *> QmlProfilerPlugin::getModels(QmlProfilerModelManager *manager) const
{
return factory->create(manager);
if (factory)
return factory->create(manager);
else
return QList<QmlProfilerTimelineModel *>();
}
} // namespace Internal