From 1925909c5f4907ebf358027bb64be9a2594160c8 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 6 Oct 2020 17:58:48 +0200 Subject: [PATCH] qmake: Fix iOS code signing after QSettings behavior change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6d9ec41f6fef7af0129d13fc99fffc7a548f6125 changed the behavior of QSettings::NativeFormat for .plist files. Previously an array of values was flattened into a multi-key QMap. Now that QMap doesn't support multiple values for the same key, the array is returned as QVariantList. Adjust the code to take that into account. Task-number: QTBUG-87218 Change-Id: I0cbf8ac7ef10b81539a29d1e68a09a40d3fe74ca Reviewed-by: Tor Arne Vestbø --- qmake/generators/mac/pbuilder_pbx.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 93b8151c31..d99b7158c3 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -499,9 +499,14 @@ static QList provisioningTeams() QList flatTeams; for (QVariantMap::const_iterator it = teamMap.begin(), end = teamMap.end(); it != end; ++it) { const QString emailAddress = it.key(); - QVariantMap team = it.value().toMap(); - team[QLatin1String("emailAddress")] = emailAddress; - flatTeams.append(team); + const QVariantList emailTeams = it.value().toList(); + + for (QVariantList::const_iterator teamIt = emailTeams.begin(), + teamEnd = emailTeams.end(); teamIt != teamEnd; ++teamIt) { + QVariantMap team = teamIt->toMap(); + team[QLatin1String("emailAddress")] = emailAddress; + flatTeams.append(team); + } } // Sort teams so that Free Provisioning teams come last