summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/bootstrap/bootstrap.pri2
-rw-r--r--src/tools/bootstrap/bootstrap.pro2
-rw-r--r--src/tools/moc/moc.cpp4
-rw-r--r--src/tools/moc/moc.h7
4 files changed, 10 insertions, 5 deletions
diff --git a/src/tools/bootstrap/bootstrap.pri b/src/tools/bootstrap/bootstrap.pri
index 15e746a..1de7b18 100644
--- a/src/tools/bootstrap/bootstrap.pri
+++ b/src/tools/bootstrap/bootstrap.pri
@@ -51,7 +51,7 @@ hpux-acc*|hpuxi-acc* {
}
LIBS += -lbootstrap
}
-!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
+!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib):!cross_compile {
unix:LIBS += -lz
# win32:LIBS += libz.lib
}
diff --git a/src/tools/bootstrap/bootstrap.pro b/src/tools/bootstrap/bootstrap.pro
index 48dc444..44dd625 100644
--- a/src/tools/bootstrap/bootstrap.pro
+++ b/src/tools/bootstrap/bootstrap.pro
@@ -95,7 +95,7 @@ macx: {
LIBS += -framework CoreServices
}
-contains(QT_CONFIG, zlib) {
+contains(QT_CONFIG, zlib)|cross_compile {
INCLUDEPATH += ../../3rdparty/zlib
SOURCES+= \
../3rdparty/zlib/adler32.c \
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 680b8a5..10a80f3 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -230,11 +230,13 @@ Type Moc::parseType()
}
}
while (test(CONST) || test(VOLATILE) || test(SIGNED) || test(UNSIGNED)
- || test(STAR) || test(AND)) {
+ || test(STAR) || test(AND) || test(ANDAND)) {
type.name += ' ';
type.name += lexem();
if (lookup(0) == AND)
type.referenceType = Type::Reference;
+ else if (lookup(0) == ANDAND)
+ type.referenceType = Type::RValueReference;
else if (lookup(0) == STAR)
type.referenceType = Type::Pointer;
}
diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h
index d365ed5..9f349b5 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) {}
@@ -242,8 +242,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;
}