moc: Use 'using' instead of 'typedef' in generated code
'using' is recommended by C++ Core Guidelines for improving readability: https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rt-using In the case of generated code it can be useful to leave moc files unchanged when modernizing code with clang-tidy's 'modernize-use-using'. Change-Id: Iabb4de2aa8d2f9396d8c8d4ee21f80fffff1dadc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>bb10
parent
50eb44cc9b
commit
fefdb84662
|
|
@ -1271,7 +1271,7 @@ void Generator::generateStaticMetacall()
|
|||
continue;
|
||||
anythingUsed = true;
|
||||
fprintf(out, " {\n");
|
||||
fprintf(out, " typedef %s (%s::*_t)(",f.type.rawName.constData() , cdef->classname.constData());
|
||||
fprintf(out, " using _t = %s (%s::*)(",f.type.rawName.constData() , cdef->classname.constData());
|
||||
|
||||
int argsCount = f.arguments.count();
|
||||
for (int j = 0; j < argsCount; ++j) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue