From b9dca8f8fa13b68a1db350e652ff1b0ead02de2a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 10 Feb 2023 11:40:27 +0100 Subject: [PATCH] ExtensionSystem: Use TestCreator in more places Amends b59e632ac37dd212f925491c24243a5f4997b38a Change-Id: I11000c488c6a69b4c55b8ccb164fa6587abb8b5b Reviewed-by: Reviewed-by: Qt CI Bot Reviewed-by: hjk --- src/libs/extensionsystem/iplugin.cpp | 2 +- src/libs/extensionsystem/iplugin.h | 3 ++- src/libs/extensionsystem/pluginspec_p.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/libs/extensionsystem/iplugin.cpp b/src/libs/extensionsystem/iplugin.cpp index b64f56cecef..9f7ca221e51 100644 --- a/src/libs/extensionsystem/iplugin.cpp +++ b/src/libs/extensionsystem/iplugin.cpp @@ -164,7 +164,7 @@ namespace Internal { class IPluginPrivate { public: - QList> testCreators; + QList testCreators; }; } // Internal diff --git a/src/libs/extensionsystem/iplugin.h b/src/libs/extensionsystem/iplugin.h index 39e00b7fad8..5a8fceb3d6e 100644 --- a/src/libs/extensionsystem/iplugin.h +++ b/src/libs/extensionsystem/iplugin.h @@ -13,6 +13,8 @@ namespace ExtensionSystem { namespace Internal { class IPluginPrivate; } +using TestCreator = std::function; + class EXTENSIONSYSTEM_EXPORT IPlugin : public QObject { Q_OBJECT @@ -41,7 +43,6 @@ public: protected: virtual void initialize() {} - using TestCreator = std::function; template void addTest(Args && ...args) { addTestCreator([args...] { return new Test(args...); }); } void addTestCreator(const TestCreator &creator); diff --git a/src/libs/extensionsystem/pluginspec_p.h b/src/libs/extensionsystem/pluginspec_p.h index 44d20f6c565..568ab943a31 100644 --- a/src/libs/extensionsystem/pluginspec_p.h +++ b/src/libs/extensionsystem/pluginspec_p.h @@ -78,7 +78,7 @@ public: PluginSpec::PluginArgumentDescriptions argumentDescriptions; IPlugin *plugin = nullptr; - QList> registeredPluginTests; + QList registeredPluginTests; PluginSpec::State state = PluginSpec::Invalid; bool hasError = false;