iOS: Add some autotests for devicectl error parsing

Change-Id: I641f0c86b30a11ca6321db88afbf2969b4863972
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Eike Ziller
2024-01-23 14:44:49 +01:00
parent 7e8aac5f3c
commit a9a5972a9f
6 changed files with 174 additions and 1 deletions

View File

@@ -25,7 +25,8 @@ Utils::expected_str<QJsonValue> Ios::Internal::parseDevicectlResult(const QByteA
if (!errorValue.isUndefined()) {
// error
QString error
= Tr::tr("Operation failed: %1.")
//: The error message (%1) can contain a full stop, so do not add it here
= Tr::tr("Operation failed: %1")
.arg(errorValue["userInfo"]["NSLocalizedDescription"]["string"].toString());
const QJsonValue userInfo
= errorValue["userInfo"]["NSUnderlyingError"]["error"]["userInfo"];