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
Alexander Volkov 2017-08-31 15:07:38 +03:00
parent 50eb44cc9b
commit fefdb84662
1 changed files with 1 additions and 1 deletions

View File

@ -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) {