diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-14 12:35:02 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-14 12:35:02 (GMT) |
commit | 7aa5b113f9fe39a24a80b5462d64b02e77ed20e7 (patch) | |
tree | 449e3187a1e9fc2a8b599b7b44859bb258647627 | |
parent | 2f700c10f3c4287d2c60918e234e92f1524e84d1 (diff) | |
parent | 78e74249014b152b93dae07bf194b16769016ad0 (diff) | |
download | Qt-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.cpp | 7 |
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()) { |