ExtensionSystem: Fix compile without WITH_TESTS

PluginSpecImpl::read is used outside of tests, but PluginSpecImpl itself
is only exported when WITH_TESTS is on. So compilation without
WITH_TESTS would fail. To circumvent this the ::read functions are moved
outside of the PluginSpecImpl and friend'd to it.

Amends b39b192518

Change-Id: I4bd8ce087267ab4e059cff2470ff882c7db6fd78
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-04-19 10:46:50 +02:00
parent 6e6d25d117
commit 7cf2e4352c
5 changed files with 17 additions and 12 deletions

View File

@@ -154,7 +154,7 @@ void checkContents(QPromise<ArchiveIssue> &promise, const FilePath &tempDir)
if (promise.isCanceled())
return;
it.next();
expected_str<PluginSpec *> spec = PluginSpecImpl::read(it.filePath());
expected_str<PluginSpec *> spec = readPluginSpec(it.filePath());
if (spec) {
// Is a Qt Creator plugin. Let's see if we find a Core dependency and check the
// version