summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/moc.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-03-19 21:48:12 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-03-22 09:55:31 (GMT)
commitf725e2b9cae1866ff6510cb339cc4ada363f9e4f (patch)
treef99fcc5349b6f05cdc512ac210b8693fff976dbe /src/tools/moc/moc.h
parent74f5e34979b8a08a91aa3c2fa6d252e68eca7817 (diff)
downloadQt-f725e2b9cae1866ff6510cb339cc4ada363f9e4f.zip
Qt-f725e2b9cae1866ff6510cb339cc4ada363f9e4f.tar.gz
Qt-f725e2b9cae1866ff6510cb339cc4ada363f9e4f.tar.bz2
Moc: Add support for rvalue references in signals and slots.
Reviewed-By: Simon Hausmann
Diffstat (limited to 'src/tools/moc/moc.h')
-rw-r--r--src/tools/moc/moc.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index 10abfc6..6fb0d49 100644
--- a/src/tools/moc/moc.h
+++ b/src/tools/moc/moc.h
@@ -55,7 +55,7 @@ struct QMetaObject;
struct Type
{
- enum ReferenceType { NoReference, Reference, Pointer };
+ 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) {}
@@ -240,8 +240,11 @@ public:
inline QByteArray noRef(const QByteArray &type)
{
- if (type.endsWith('&'))
+ if (type.endsWith('&')) {
+ if (type.endsWith("&&"))
+ return type.left(type.length()-2);
return type.left(type.length()-1);
+ }
return type;
}