Handle primitives in signals properly (not const)

Emanoil Kotsev 5 years ago
parent 81cebe1f20
commit 8cc9b4dde9

@ -923,9 +923,20 @@ void MethodGenerator::writeSignalEmitter(const Class& classData,
TQValueList<Argument>::const_iterator endIt = method.arguments.end();
for (; it != endIt;)
{
stream << "const ";
if (!(*it).isPrimitive && ((*it).direction == Argument::In || method.type == Method::_Signal))
{
stream << "const ";
}
stream << (*it).signature;
stream << "& " << (*it).name;
if (!(*it).isPrimitive || ((*it).direction == Argument::Out && method.type != Method::_Signal))
{
stream << "&";
}
stream << " " << (*it).name;
++it;
if (it != endIt)
{

Loading…
Cancel
Save