diff options
author | BogDan Vatra <bogdan@kdab.com> | 2016-08-23 22:32:11 +0300 |
---|---|---|
committer | BogDan Vatra <bogdan@kdab.com> | 2016-09-06 10:29:21 +0000 |
commit | 21b7661a797ecf77fbcad4380e6dcb2ade929a18 (patch) | |
tree | 0536792e237d686e3cae1b35ebd0ad4dca834393 /src | |
parent | 23ef3b04ebfc0c7a87800b4ff09444c854e31fdb (diff) |
Parse namespaces only for current file, add Q_NAMESPACE support to qmake
Parsing the other files will (re)generate the same metaobject info in two places
Change-Id: I8984ed30751a7587de870f55dd427f067d1b2495
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/moc/moc.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 22207a9030..eda410783c 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -560,7 +560,8 @@ void Moc::parse() until(RBRACE); def.end = index; index = def.begin + 1; - while (inNamespace(&def) && hasNext()) { + const bool parseNamespace = currentFilenames.size() <= 1; + while (parseNamespace && inNamespace(&def) && hasNext()) { switch (next()) { case Q_NAMESPACE_TOKEN: def.hasQNamespace = true; |