From 53cbf82fe7ed51d64c97f544c8b7cec02c469df2 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 9 Feb 2023 11:40:41 +0100 Subject: [PATCH] QmlProfiler: Use new plugin test object setup Change-Id: Id1aa7ac2151682b2ee8d4fc7dcf94ce0b97acd47 Reviewed-by: Christian Stenger Reviewed-by: --- src/plugins/qmlprofiler/qmlprofilerplugin.cpp | 54 +++++++++---------- src/plugins/qmlprofiler/qmlprofilerplugin.h | 1 - 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp index 31a4999b657..d562131e00f 100644 --- a/src/plugins/qmlprofiler/qmlprofilerplugin.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerplugin.cpp @@ -71,6 +71,31 @@ public: bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString) { Q_UNUSED(arguments) + +#ifdef WITH_TESTS + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + addTest(); + + addTest(); // Trigger debug connector to be started +#endif + return Utils::HostOsInfo::canCreateOpenGLContext(errorString); } @@ -99,33 +124,4 @@ QmlProfilerSettings *QmlProfilerPlugin::globalSettings() return qmlProfilerGlobalSettings(); } -QVector QmlProfiler::Internal::QmlProfilerPlugin::createTestObjects() const -{ - QVector 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 diff --git a/src/plugins/qmlprofiler/qmlprofilerplugin.h b/src/plugins/qmlprofiler/qmlprofilerplugin.h index 262fd73bc73..e189268e705 100644 --- a/src/plugins/qmlprofiler/qmlprofilerplugin.h +++ b/src/plugins/qmlprofiler/qmlprofilerplugin.h @@ -21,7 +21,6 @@ private: bool initialize(const QStringList &arguments, QString *errorString) final; void extensionsInitialized() final; ShutdownFlag aboutToShutdown() final; - QVector createTestObjects() const final; class QmlProfilerPluginPrivate *d = nullptr; };