forked from qt-creator/qt-creator
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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user