Utils: Limit the usage of qMakePair

Change-Id: I93eba395ddc580950a7eeb908555736ff48a3e3d
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-09-30 11:40:32 +02:00
parent 738803a4da
commit d1e521d223
2 changed files with 18 additions and 18 deletions

View File

@@ -61,7 +61,7 @@ void Environment::appendOrSet(const QString &key, const QString &value, const QS
QTC_ASSERT(!key.contains('='), return );
const auto it = m_dict.findKey(key);
if (it == m_dict.m_values.end()) {
m_dict.m_values.insert(DictKey(key, m_dict.nameCaseSensitivity()), qMakePair(value, true));
m_dict.m_values.insert(DictKey(key, m_dict.nameCaseSensitivity()), {value, true});
} else {
// Append unless it is already there
const QString toAppend = sep + value;
@@ -75,7 +75,7 @@ void Environment::prependOrSet(const QString &key, const QString &value, const Q
QTC_ASSERT(!key.contains('='), return );
const auto it = m_dict.findKey(key);
if (it == m_dict.m_values.end()) {
m_dict.m_values.insert(DictKey(key, m_dict.nameCaseSensitivity()), qMakePair(value, true));
m_dict.m_values.insert(DictKey(key, m_dict.nameCaseSensitivity()), {value, true});
} else {
// Prepend unless it is already there
const QString toPrepend = value + sep;