summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutomoc.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2011-11-30 20:43:05 (GMT)
committerAlex Neundorf <neundorf@kde.org>2011-11-30 20:43:05 (GMT)
commit8507eaed1659d91709c41d34b351ea6a0585983e (patch)
treeeb1cd48a0e86ec197c46d34ceebd991940e837bb /Source/cmQtAutomoc.cxx
parent7ada172002e56d3900f4498a2f1bc2ffbc531816 (diff)
downloadCMake-8507eaed1659d91709c41d34b351ea6a0585983e.zip
CMake-8507eaed1659d91709c41d34b351ea6a0585983e.tar.gz
CMake-8507eaed1659d91709c41d34b351ea6a0585983e.tar.bz2
automoc: fix handling of included _p.moc files
Alex
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r--Source/cmQtAutomoc.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index 0103bcc..bb81dd3 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -663,6 +663,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
}
else
{
+ std::string fileToMoc = absFilename;
if (basename != scannedFileBasename)
{
bool fail = true;
@@ -676,7 +677,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
{
// this is for KDE4 compatibility:
fail = false;
- includedMocs[headerToMoc] = currentMoc;
+ fileToMoc = headerToMoc;
std::cerr << "AUTOMOC: warning: " << absFilename << ": The file "
"includes the moc file \"" << currentMoc <<
"\" instead of \"moc_" << basename << ".cpp\". "
@@ -703,7 +704,7 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename,
dotMocIncluded = true;
ownDotMocFile = currentMoc;
}
- includedMocs[absFilename] = currentMoc;
+ includedMocs[fileToMoc] = currentMoc;
}
matchOffset += mocIncludeRegExp.end();
} while(mocIncludeRegExp.find(contentsString.c_str() + matchOffset));