summaryrefslogtreecommitdiff
path: root/src/plugins/scanner
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@theqtcompany.com>2016-03-25 21:56:19 -0700
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-04-06 11:20:45 +0000
commitad78ab0bd362c79b58ebb44dfd0646f49027bb37 (patch)
tree68455f1c6a014f9e4ca61dbd01e3f5ddfb7894ab /src/plugins/scanner
parent25208193f502801475a8f8e571827e027c77ca40 (diff)
downloadqbs-ad78ab0bd362c79b58ebb44dfd0646f49027bb37.tar.gz
Correctly handle Objective-C++ source files in moc.
Task-number: QBS-951 Change-Id: I692ac696f22ccc02c0db530abf66ae24a1a398fa Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/plugins/scanner')
-rw-r--r--src/plugins/scanner/cpp/cppscanner.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/scanner/cpp/cppscanner.cpp b/src/plugins/scanner/cpp/cppscanner.cpp
index 1d5f4c156..226e75bcb 100644
--- a/src/plugins/scanner/cpp/cppscanner.cpp
+++ b/src/plugins/scanner/cpp/cppscanner.cpp
@@ -173,7 +173,9 @@ static void scanCppFile(void *opaq, Lexer &yylex, bool scanForFileTags, bool sca
opaque->hasPluginMetaDataMacro = true;
}
if (!scanForDependencies && opaque->hasQObjectMacro
- && (opaque->fileType == Opaq::FT_CPP || opaque->hasPluginMetaDataMacro))
+ && (opaque->hasPluginMetaDataMacro
+ || opaque->fileType == Opaq::FT_CPP
+ || opaque->fileType == Opaq::FT_OBJCPP))
break;
}
}
@@ -265,6 +267,7 @@ static const char **additionalFileTags(void *opaq, int *size)
*size = 1;
switch (opaque->fileType) {
case Opaq::FT_CPP:
+ case Opaq::FT_OBJCPP:
return thMocCpp;
case Opaq::FT_HPP:
return opaque->hasPluginMetaDataMacro ? thMocPluginHpp : thMocHpp;