diff options
author | Sergio Martins <sergio.martins@kdab.com> | 2018-12-05 19:48:05 +0000 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2018-12-10 11:47:28 +0000 |
commit | 3464e1e5c7b5b01ae13c99e3529dd02af1d36958 (patch) | |
tree | c64654aa734d71add2df23872fa77113193e6d0e /src/tools/moc/generator.cpp | |
parent | fc85a6b6b952aa619b87262d4187dc05865ab51a (diff) |
Add a few qAsConst() to range-for to prevent detachments
places indicated by clazy
As a drive-by, fixed minor styling issues in the affected lines.
Change-Id: I88d3fc0c8573cde0e61f19a18dd9ea697ee40c34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/tools/moc/generator.cpp')
-rw-r--r-- | src/tools/moc/generator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index e5f1c61e3c..02c1fbd394 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -619,7 +619,7 @@ void Generator::generateCode() fprintf(out, "// a) You are using a NOTIFY signal that does not exist. Fix it.\n"); fprintf(out, "// b) You are using a NOTIFY signal that does exist (in a parent class) but has a non-empty parameter list. This is a moc limitation.\n"); fprintf(out, "Q_DECL_UNUSED static void checkNotifySignalValidity_%s(%s *t) {\n", qualifiedClassNameIdentifier.constData(), cdef->qualified.constData()); - for (const QByteArray &nonClassSignal : cdef->nonClassSignalList) + for (const QByteArray &nonClassSignal : qAsConst(cdef->nonClassSignalList)) fprintf(out, " t->%s();\n", nonClassSignal.constData()); fprintf(out, "}\n"); } |