iOS: Avoid iostool for info gathering if possible

Previously we had a small workaround for retrieving the state of
developer mode for iOS 17 devices integrated into our own iostool.

Instead use devicectl for gathering device information for devices that
it can handle, and only fall back to iostool for the devices that it
cannot handle.

Since iostool cannot handle deployment, running, and debugging for
iOS 17 devices anyway, the end goal would be to only use devicectl
for these.

Also add a TaskTree wrapper for IosToolHandler for convenience.

Change-Id: I5bcd09eb354c2dce9b21e62e140de16f2e740d6e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2024-01-10 10:52:04 +01:00
parent e595c3f615
commit 150441bf88
5 changed files with 127 additions and 44 deletions

View File

@@ -973,6 +973,28 @@ bool IosToolHandler::isRunning() const
return d->isRunning();
}
void IosToolRunner::setStartHandler(const StartHandler &startHandler)
{
m_startHandler = startHandler;
}
void IosToolRunner::setDeviceType(const Internal::IosDeviceType &type)
{
m_deviceType = type;
}
IosToolTaskAdapter::IosToolTaskAdapter() {}
void IosToolTaskAdapter::start()
{
task()->m_iosToolHandler = new IosToolHandler(Internal::IosDeviceType(task()->m_deviceType));
connect(task()->m_iosToolHandler, &IosToolHandler::finished, this, [this] {
task()->m_iosToolHandler->deleteLater();
emit done(Tasking::DoneResult::Success);
});
task()->m_startHandler(task()->m_iosToolHandler);
}
} // namespace Ios
#include "iostoolhandler.moc"