summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-17 11:01:26 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 11:44:29 +0100
commit10d3ed8ca961773c079fe337a3e3507eadb36934 (patch)
tree804944b583382533d2d12a1145be5233df008b59 /src
parent3bd29d1f0af0c26189de7208582a23bfb9582e3c (diff)
Qt 5 plugin system: Fix handling of namespaced plugin classes.
- Add 'using namespace' to moc code as was the case in 4.8. Change-Id: I26cba9ad74bf05eecc5205714c32c3176695e3b4 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/moc/generator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 8242fb45ec..f3a2b4a39b 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -1096,6 +1096,10 @@ void Generator::generatePluginMetaData()
}
fprintf(out, " 0x%02x\n};\n", (uchar)binary.at(binary.size() - 1));
#endif
+ // 'Use' all namespaces.
+ int pos = cdef->qualified.indexOf("::");
+ for ( ; pos != -1 ; pos = cdef->qualified.indexOf("::", pos + 2) )
+ fprintf(out, "using namespace %s;\n", cdef->qualified.left(pos).constData());
fprintf(out, "QT_MOC_EXPORT_PLUGIN(%s)\n\n", cdef->classname.constData());
}