##// END OF EJS Templates
generate extra wrappers for virtual slots to allow correct deriving via Python and to avoid recursion...
florianlink -
r175:7bc6abba6c12
parent child
Show More
@@ -489,7 +489,7 public:
489 FunctionType functionType() const { return m_function_type; }
489 FunctionType functionType() const { return m_function_type; }
490 void setFunctionType(FunctionType type) { m_function_type = type; }
490 void setFunctionType(FunctionType type) { m_function_type = type; }
491
491
492 bool isVirtual() { return !(isFinal() || isSignal() || isStatic()); }
492 bool isVirtual() const { return !(isFinal() || isSignal() || isStatic()); }
493
493
494 QStringList introspectionCompatibleSignatures(const QStringList &resolvedArguments = QStringList()) const;
494 QStringList introspectionCompatibleSignatures(const QStringList &resolvedArguments = QStringList()) const;
495 QString signature() const;
495 QString signature() const;
@@ -272,7 +272,7 void ShellHeaderGenerator::write(QTextStream &s, const AbstractMetaClass *meta_c
272 AbstractMetaFunctionList functions = getFunctionsToWrap(meta_class);
272 AbstractMetaFunctionList functions = getFunctionsToWrap(meta_class);
273
273
274 foreach (const AbstractMetaFunction *function, functions) {
274 foreach (const AbstractMetaFunction *function, functions) {
275 if (!function->isSlot()) {
275 if (!function->isSlot() || function->isVirtual()) {
276 s << " ";
276 s << " ";
277 writeFunctionSignature(s, function, 0, QString(),
277 writeFunctionSignature(s, function, 0, QString(),
278 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject| IncludeDefaultExpression | OriginalName | ShowStatic | UnderscoreSpaces));
278 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject| IncludeDefaultExpression | OriginalName | ShowStatic | UnderscoreSpaces));
@@ -226,8 +226,10 void ShellImplGenerator::write(QTextStream &s, const AbstractMetaClass *meta_cla
226 // write member functions
226 // write member functions
227 for (int i = 0; i < functions.size(); ++i) {
227 for (int i = 0; i < functions.size(); ++i) {
228 AbstractMetaFunction *fun = functions.at(i);
228 AbstractMetaFunction *fun = functions.at(i);
229 if (fun->isSlot()) continue;
229 bool needsWrapping = (!fun->isSlot() || fun->isVirtual());
230
230 if (!needsWrapping) {
231 continue;
232 }
231 writeFunctionSignature(s, fun, meta_class, QString(),
233 writeFunctionSignature(s, fun, meta_class, QString(),
232 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject | OriginalName | ShowStatic | UnderscoreSpaces),
234 Option(ConvertReferenceToPtr | FirstArgIsWrappedObject | OriginalName | ShowStatic | UnderscoreSpaces),
233 "PythonQtWrapper_");
235 "PythonQtWrapper_");
@@ -489,8 +489,7
489 <enum-type name="QSharedMemory::AccessMode"/>
489 <enum-type name="QSharedMemory::AccessMode"/>
490 <enum-type name="QSharedMemory::SharedMemoryError"/>
490 <enum-type name="QSharedMemory::SharedMemoryError"/>
491 <enum-type name="QElapsedTimer::ClockType"/>
491 <enum-type name="QElapsedTimer::ClockType"/>
492 <enum-type name="QMetaType::Type"/>
492
493
494 <enum-type name="QtMsgType">
493 <enum-type name="QtMsgType">
495 <reject-enum-value name="QtSystemMsg"/>
494 <reject-enum-value name="QtSystemMsg"/>
496 </enum-type>
495 </enum-type>
General Comments 0
You need to be logged in to leave comments. Login now