diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-14 09:23:41 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-04-18 04:48:59 +0000 |
commit | 777d46b40360c302a49fc5b789cee6d0d05f840a (patch) | |
tree | 352a8d94a79e6b460a7b9cbe125448729dd30f22 /src/tools/moc/main.cpp | |
parent | 5361a8dec5300761044dd8a2628db0c0448075cc (diff) |
Moc: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: Iefc33552d826aa30320e52acd2d421c9bdae127e
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/tools/moc/main.cpp')
-rw-r--r-- | src/tools/moc/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 06d1c86d54..0734a92d5a 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -360,7 +360,7 @@ int runMoc(int argc, char **argv) int spos = filename.lastIndexOf(QDir::separator()); int ppos = filename.lastIndexOf(QLatin1Char('.')); // spos >= -1 && ppos > spos => ppos >= 0 - moc.noInclude = (ppos > spos && filename[ppos + 1].toLower() != QLatin1Char('h')); + moc.noInclude = (ppos > spos && filename.at(ppos + 1).toLower() != QLatin1Char('h')); } if (defaultInclude) { if (moc.includePath.isEmpty()) { |