Macro: fix saving macros

QMap::count returnes a size_type with Qt 6 in contrast to an int with
Qt 5. Convert this value always to an int to be backwards compatible.

Fixes: QTCREATORBUG-27543
Change-Id: Ibd37ede40e5eb4cd5e5172529455196242a97666
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2022-05-19 10:26:48 +02:00
parent 757b6554d8
commit f67a778d2e

View File

@@ -75,7 +75,7 @@ void MacroEvent::load(QDataStream &stream)
void MacroEvent::save(QDataStream &stream) const void MacroEvent::save(QDataStream &stream) const
{ {
stream << m_id.name(); stream << m_id.name();
stream << m_values.count(); stream << int(m_values.count());
for (auto i = m_values.cbegin(), end = m_values.cend(); i != end; ++i) for (auto i = m_values.cbegin(), end = m_values.cend(); i != end; ++i)
stream << i.key() << i.value(); stream << i.key() << i.value();
} }