From f67a778d2e2f95c2102f5615cac841319e12ff6e Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 19 May 2022 10:26:48 +0200 Subject: [PATCH] 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 --- src/plugins/macros/macroevent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/macros/macroevent.cpp b/src/plugins/macros/macroevent.cpp index 9b372987985..40dfd3de7fa 100644 --- a/src/plugins/macros/macroevent.cpp +++ b/src/plugins/macros/macroevent.cpp @@ -75,7 +75,7 @@ void MacroEvent::load(QDataStream &stream) void MacroEvent::save(QDataStream &stream) const { 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) stream << i.key() << i.value(); }