summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2011-10-31 15:22:31 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-14 15:52:26 +0100
commit49bd825a9626eda77fd9e8313e1868bed4c77bff (patch)
tree586101b058be0f70014157c3185504cf65127d2e /src/tools/moc/moc.h
parente9c7edddb58bb69a29e75712adfa059dcfcc71fd (diff)
moc: support mapping pointers to member functions to indexes
This change adds QMetaObject::IndexOfMethod as a parameter to the qt_static_metacall function. It lets the moc generated code return the index of a signal or slot given its pointer to member function This is required to support the new connection syntax Change-Id: I39198c6699b5aa3599d3d282f7ac79b1e3684d33 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 917cf69a51..5772a5a6ba 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -58,8 +58,12 @@ struct Type
enum ReferenceType { NoReference, Reference, RValueReference, Pointer };
inline Type() : isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {}
- inline explicit Type(const QByteArray &_name) : name(_name), isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {}
+ inline explicit Type(const QByteArray &_name)
+ : name(_name), rawName(name), isVolatile(false), isScoped(false), firstToken(NOTOKEN), referenceType(NoReference) {}
QByteArray name;
+ //When used as a return type, the type name may be modified to remove the references.
+ // rawName is the type as found in the function signature
+ QByteArray rawName;
uint isVolatile : 1;
uint isScoped : 1;
Token firstToken;