aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/qtmocscanner.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-23 10:34:36 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-04-23 10:24:36 +0000
commit886ab87bdf12468d0d32c2541437cd7174f486d7 (patch)
tree933e134421610e4ef9363ac4d3341ce7ff8d32f3 /src/lib/corelib/buildgraph/qtmocscanner.cpp
parent32d4ca135a25ae6b0c350dde3692741b7d862d82 (diff)
Prevent automatic casting from char* to QString.
Reason 1: Internationalization. Reason 2: Performance issues due to inadvertant QString instantiations in hot code paths. Task-number: QBS-780 Change-Id: I37c740dd828e11c5b0000a0dd472a519d032d71c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/lib/corelib/buildgraph/qtmocscanner.cpp')
-rw-r--r--src/lib/corelib/buildgraph/qtmocscanner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/qtmocscanner.cpp b/src/lib/corelib/buildgraph/qtmocscanner.cpp
index e552f06fa..78a0a8ae0 100644
--- a/src/lib/corelib/buildgraph/qtmocscanner.cpp
+++ b/src/lib/corelib/buildgraph/qtmocscanner.cpp
@@ -122,7 +122,8 @@ void QtMocScanner::findIncludedMocCppFiles()
= runScanner(m_cppScanner, artifact, m_scanResultCache);
foreach (const ScanResultCache::Dependency &dependency, scanResult.deps) {
QString includedFilePath = dependency.filePath();
- if (includedFilePath.startsWith("moc_") && includedFilePath.endsWith(".cpp")) {
+ if (includedFilePath.startsWith(QLatin1String("moc_"))
+ && includedFilePath.endsWith(QLatin1String(".cpp"))) {
if (m_logger.traceEnabled())
m_logger.qbsTrace() << "[QtMocScanner] " << artifact->fileName()
<< " includes " << includedFilePath;