iOS: Extract basic devicectl output processing

Put creating the JSON document and error parsing into a separate
function.

Change-Id: I257f82249a07220467c33220c6b8e4650266b8d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Eike Ziller
2024-01-15 14:05:29 +01:00
parent c475cdf42d
commit 0ecab7e0d8
4 changed files with 78 additions and 39 deletions

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#include <utils/expected.h>
#include <QJsonValue>
namespace Ios::Internal {
Utils::expected_str<QJsonValue> parseDevicectlResult(const QByteArray &rawOutput);
} // namespace Ios::Internal