#if defined(QT_STATICPLUGIN)
-# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS) \
- static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGINCLASS() \
+# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
+ static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance_##PLUGINCLASSNAME() \
Q_PLUGIN_INSTANCE(PLUGINCLASS) \
- static const char *qt_plugin_query_metadata_##PLUGINCLASS() { return (const char *)qt_pluginMetaData; } \
- const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGINCLASS() { \
- QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance_##PLUGINCLASS, qt_plugin_query_metadata_##PLUGINCLASS}; \
+ static const char *qt_plugin_query_metadata_##PLUGINCLASSNAME() { return (const char *)qt_pluginMetaData; } \
+ const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##PLUGINCLASSNAME() { \
+ QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance_##PLUGINCLASSNAME, qt_plugin_query_metadata_##PLUGINCLASSNAME}; \
return plugin; \
}
#else
-# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS) \
+# define QT_MOC_EXPORT_PLUGIN(PLUGINCLASS, PLUGINCLASSNAME) \
Q_EXTERN_C Q_DECL_EXPORT \
const char *qt_plugin_query_metadata() \
{ return (const char *)qt_pluginMetaData; } \
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->qualified.constData());
+ fprintf(out, "QT_MOC_EXPORT_PLUGIN(%s, %s)\n\n",
+ cdef->qualified.constData(), cdef->classname.constData());
}
QT_END_NAMESPACE