aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-02-09 15:29:21 +0100
committerhjk <hjk@qt.io>2023-02-14 14:29:02 +0000
commitce6e5acea7d92d48d05f9fe275677a53eb11e838 (patch)
tree818a34c1d398cbe42f83ab1eeee750f46e41edfb
parent47cdeb779af38f567b66811bb01ef4efd52ec72d (diff)
ExtensionSystem: Deprecate IPlugin::createTestObjects
The recommended replacement is to use addTest(). Change-Id: Id655cb8a55a581925c2437a5b8f74484532392ad Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--src/libs/extensionsystem/iplugin.cpp17
-rw-r--r--src/libs/extensionsystem/iplugin.h3
2 files changed, 9 insertions, 11 deletions
diff --git a/src/libs/extensionsystem/iplugin.cpp b/src/libs/extensionsystem/iplugin.cpp
index 006afaa55c..b64f56cece 100644
--- a/src/libs/extensionsystem/iplugin.cpp
+++ b/src/libs/extensionsystem/iplugin.cpp
@@ -197,9 +197,12 @@ bool IPlugin::initialize(const QStringList &arguments, QString *errorString)
/*!
Registers a function object that creates a test object.
- The ownership of the created object is transferred to the plugin.
+ The created objects are meant to be passed on to \l QTest::qExec().
+
+ The function objects will be called if the user starts \QC with
+ \c {-test PluginName} or \c {-test all}.
- \sa createTestObjects()
+ The ownership of the created object is transferred to the plugin.
*/
void IPlugin::addTestCreator(const TestCreator &creator)
@@ -208,15 +211,7 @@ void IPlugin::addTestCreator(const TestCreator &creator)
}
/*!
- Returns objects that are meant to be passed on to \l QTest::qExec().
-
- This function will be called if the user starts \QC with
- \c {-test PluginName} or \c {-test all}.
-
- By default, this function creates test objects using the functors
- added by \c addTest().
-
- The ownership of returned objects is transferred to caller.
+ \deprecated [10.0] Use addTest() instead
\sa addTest()
*/
diff --git a/src/libs/extensionsystem/iplugin.h b/src/libs/extensionsystem/iplugin.h
index a1a8003dc8..39e00b7fad 100644
--- a/src/libs/extensionsystem/iplugin.h
+++ b/src/libs/extensionsystem/iplugin.h
@@ -33,6 +33,9 @@ public:
virtual QObject *remoteCommand(const QStringList & /* options */,
const QString & /* workingDirectory */,
const QStringList & /* arguments */) { return nullptr; }
+
+
+ // Deprecated in 10.0, use addTest()
virtual QVector<QObject *> createTestObjects() const;
protected: