forked from qt-creator/qt-creator
QmlProfiler: Use new plugin test object setup
Change-Id: Id1aa7ac2151682b2ee8d4fc7dcf94ce0b97acd47 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -71,6 +71,31 @@ public:
|
||||
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
|
||||
{
|
||||
Q_UNUSED(arguments)
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
addTest<DebugMessagesModelTest>();
|
||||
addTest<FlameGraphModelTest>();
|
||||
addTest<FlameGraphViewTest>();
|
||||
addTest<InputEventsModelTest>();
|
||||
addTest<LocalQmlProfilerRunnerTest>();
|
||||
addTest<MemoryUsageModelTest>();
|
||||
addTest<PixmapCacheModelTest>();
|
||||
addTest<QmlEventTest>();
|
||||
addTest<QmlEventLocationTest>();
|
||||
addTest<QmlEventTypeTest>();
|
||||
addTest<QmlNoteTest>();
|
||||
addTest<QmlProfilerAnimationsModelTest>();
|
||||
addTest<QmlProfilerAttachDialogTest>();
|
||||
addTest<QmlProfilerBindingLoopsRenderPassTest>();
|
||||
addTest<QmlProfilerClientManagerTest>();
|
||||
addTest<QmlProfilerDetailsRewriterTest>();
|
||||
addTest<QmlProfilerToolTest>();
|
||||
addTest<QmlProfilerTraceClientTest>();
|
||||
addTest<QmlProfilerTraceViewTest>();
|
||||
|
||||
addTest<QQmlEngine>(); // Trigger debug connector to be started
|
||||
#endif
|
||||
|
||||
return Utils::HostOsInfo::canCreateOpenGLContext(errorString);
|
||||
}
|
||||
|
||||
@@ -99,33 +124,4 @@ QmlProfilerSettings *QmlProfilerPlugin::globalSettings()
|
||||
return qmlProfilerGlobalSettings();
|
||||
}
|
||||
|
||||
QVector<QObject *> QmlProfiler::Internal::QmlProfilerPlugin::createTestObjects() const
|
||||
{
|
||||
QVector<QObject *> tests;
|
||||
#ifdef WITH_TESTS
|
||||
tests << new DebugMessagesModelTest;
|
||||
tests << new FlameGraphModelTest;
|
||||
tests << new FlameGraphViewTest;
|
||||
tests << new InputEventsModelTest;
|
||||
tests << new LocalQmlProfilerRunnerTest;
|
||||
tests << new MemoryUsageModelTest;
|
||||
tests << new PixmapCacheModelTest;
|
||||
tests << new QmlEventTest;
|
||||
tests << new QmlEventLocationTest;
|
||||
tests << new QmlEventTypeTest;
|
||||
tests << new QmlNoteTest;
|
||||
tests << new QmlProfilerAnimationsModelTest;
|
||||
tests << new QmlProfilerAttachDialogTest;
|
||||
tests << new QmlProfilerBindingLoopsRenderPassTest;
|
||||
tests << new QmlProfilerClientManagerTest;
|
||||
tests << new QmlProfilerDetailsRewriterTest;
|
||||
tests << new QmlProfilerToolTest;
|
||||
tests << new QmlProfilerTraceClientTest;
|
||||
tests << new QmlProfilerTraceViewTest;
|
||||
|
||||
tests << new QQmlEngine; // Trigger debug connector to be started
|
||||
#endif
|
||||
return tests;
|
||||
}
|
||||
|
||||
} // QmlProfiler::Internal
|
||||
|
||||
@@ -21,7 +21,6 @@ private:
|
||||
bool initialize(const QStringList &arguments, QString *errorString) final;
|
||||
void extensionsInitialized() final;
|
||||
ShutdownFlag aboutToShutdown() final;
|
||||
QVector<QObject *> createTestObjects() const final;
|
||||
|
||||
class QmlProfilerPluginPrivate *d = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user