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; };