aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scanner
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-08-30 11:38:25 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-08-30 12:13:22 +0200
commit019c8a2a2b8783f80cd268804c74ebd76aa564b8 (patch)
tree833818d62681d3f3e1ad57a0e922fbc248a12539 /src/plugins/scanner
parent45ab9f6a850f381ddeb249e62b531eb32e2945cf (diff)
fix cppscanner file type passing
Without the proper file type, Q_PLUGIN_METADATA wasn't found anymore. Change-Id: I9f753422fd8fd388f9e8c5a4ba1d49543dc45382 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/plugins/scanner')
-rw-r--r--src/plugins/scanner/cpp/cppscanner.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/scanner/cpp/cppscanner.cpp b/src/plugins/scanner/cpp/cppscanner.cpp
index 0aa774561..97377ef30 100644
--- a/src/plugins/scanner/cpp/cppscanner.cpp
+++ b/src/plugins/scanner/cpp/cppscanner.cpp
@@ -164,10 +164,11 @@ static void scanCppFile(void *opaq, Lexer &yylex, bool scanForFileTags, bool sca
}
}
-static Opaq *openScanner(const unsigned short *filePath, int flags)
+static Opaq *openScanner(const unsigned short *filePath, Opaq::FileType fileType, int flags)
{
QScopedPointer<Opaq> opaque(new Opaq);
opaque->fileName = QString::fromUtf16(filePath);
+ opaque->fileType = fileType;
size_t mapl = 0;
#ifdef Q_OS_UNIX
@@ -209,10 +210,7 @@ static Opaq *openScanner(const unsigned short *filePath, int flags)
template <typename Opaq::FileType t>
static void *openScannerT(const unsigned short *filePath, int flags)
{
- Opaq *opaq = openScanner(filePath, flags);
- if (opaq)
- opaq->fileType = t;
- return opaq;
+ return openScanner(filePath, t, flags);
}
static void closeScanner(void *ptr)