Merge remote-tracking branch 'origin/4.15'

Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp

Change-Id: I403b236c40d73a61ae22304e289e9d4374366395
This commit is contained in:
Eike Ziller
2021-04-06 15:17:40 +02:00
221 changed files with 4167 additions and 3192 deletions

View File

@@ -150,15 +150,20 @@ Utils::optional<LanguageClientValue<T>> JsonObject::optionalClientValue(const QS
template<typename T>
QList<T> JsonObject::array(const QString &key) const
{
return LanguageClientArray<T>(value(key)).toList();
const Utils::optional<QList<T>> &array = optionalArray<T>(key);
if (array.has_value())
return array.value();
qCDebug(conversionLog) << QString("Expected array under %1 in:").arg(key) << *this;
return {};
}
template<typename T>
Utils::optional<QList<T>> JsonObject::optionalArray(const QString &key) const
{
using Result = Utils::optional<QList<T>>;
return contains(key) ? Result(LanguageClientArray<T>(value(key)).toList())
: Result(Utils::nullopt);
const QJsonValue &jsonValue = value(key);
if (jsonValue.isUndefined())
return Utils::nullopt;
return Utils::transform<QList<T>>(jsonValue.toArray(), &fromJsonValue<T>);
}
template<typename T>