summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-14 12:35:02 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-14 12:35:02 (GMT)
commit7aa5b113f9fe39a24a80b5462d64b02e77ed20e7 (patch)
tree449e3187a1e9fc2a8b599b7b44859bb258647627
parent2f700c10f3c4287d2c60918e234e92f1524e84d1 (diff)
parent78e74249014b152b93dae07bf194b16769016ad0 (diff)
downloadQt-7aa5b113f9fe39a24a80b5462d64b02e77ed20e7.zip
Qt-7aa5b113f9fe39a24a80b5462d64b02e77ed20e7.tar.gz
Qt-7aa5b113f9fe39a24a80b5462d64b02e77ed20e7.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: fix detection of header files
-rw-r--r--src/tools/moc/main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
index ebe1834..4997690 100644
--- a/src/tools/moc/main.cpp
+++ b/src/tools/moc/main.cpp
@@ -359,11 +359,10 @@ int runMoc(int _argc, char **_argv)
if (autoInclude) {
+ int spos = filename.lastIndexOf(QDir::separator().toLatin1());
int ppos = filename.lastIndexOf('.');
- moc.noInclude = (ppos >= 0
- && tolower(filename[ppos + 1]) != 'h'
- && tolower(filename[ppos + 1]) != QDir::separator().toLatin1()
- );
+ // spos >= -1 && ppos > spos => ppos >= 0
+ moc.noInclude = (ppos > spos && tolower(filename[ppos + 1]) != 'h');
}
if (moc.includeFiles.isEmpty()) {
if (moc.includePath.isEmpty()) {