forked from qt-creator/qt-creator
Add flamegraph view
Change-Id: I001053b63d27adcbbdfd95abb2b45f5f5fa05447 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
#include "memoryusagemodel.h"
|
||||
#include "inputeventsmodel.h"
|
||||
#include "debugmessagesmodel.h"
|
||||
#include "flamegraphview.h"
|
||||
|
||||
using namespace QmlProfilerExtension::Internal;
|
||||
|
||||
@@ -65,6 +66,18 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class ViewFactory : public QmlProfiler::QmlProfilerEventsViewFactory {
|
||||
Q_OBJECT
|
||||
public:
|
||||
QList<QmlProfiler::QmlProfilerEventsView *> create(
|
||||
QWidget *parent, QmlProfiler::QmlProfilerModelManager *manager) override
|
||||
{
|
||||
QList<QmlProfiler::QmlProfilerEventsView *> views;
|
||||
views << new FlameGraphView(parent, manager);
|
||||
return views;
|
||||
}
|
||||
};
|
||||
|
||||
QmlProfilerExtensionPlugin::QmlProfilerExtensionPlugin()
|
||||
{
|
||||
// Create your members
|
||||
@@ -93,8 +106,10 @@ bool QmlProfilerExtensionPlugin::initialize(const QStringList &arguments, QStrin
|
||||
= ExtensionSystem::PluginManager::getObject<LicenseChecker::LicenseCheckerPlugin>();
|
||||
|
||||
if (licenseChecker && licenseChecker->hasValidLicense()) {
|
||||
if (licenseChecker->enterpriseFeatures())
|
||||
if (licenseChecker->enterpriseFeatures()) {
|
||||
addAutoReleasedObject(new ModelFactory);
|
||||
addAutoReleasedObject(new ViewFactory);
|
||||
}
|
||||
} else {
|
||||
qWarning() << "Invalid license, disabling QML Profiler Enterprise features";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user