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>
This commit is contained in:
Friedemann Kleint 2012-02-17 11:01:26 +01:00 committed by Qt by Nokia
parent 3bd29d1f0a
commit 10d3ed8ca9

View File

@ -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());
}