diff options
author | aavit <qt-info@nokia.com> | 2011-04-26 08:28:04 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-04-26 08:28:04 (GMT) |
commit | ff8c99eb54f33108709f9f3107b35780a80f3f17 (patch) | |
tree | 11d4c08809bf90fd8b25b175b4903ab00d36e3d6 /src/declarative | |
parent | 28c7e17d9eeb8264ad9e26a5b93e5ff744add9a6 (diff) | |
parent | 7ef9f99301a7c71fdb835f9e1f27d3111557aa2e (diff) | |
download | Qt-ff8c99eb54f33108709f9f3107b35780a80f3f17.zip Qt-ff8c99eb54f33108709f9f3107b35780a80f3f17.tar.gz Qt-ff8c99eb54f33108709f9f3107b35780a80f3f17.tar.bz2 |
Merge remote branch 'qt-mainline/master'
Conflicts:
configure
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeflickable.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeboundsignal.cpp | 28 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 10 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeproperty.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmetaobjectbuilder.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qmetaobjectbuilder_p.h | 2 | ||||
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 3 |
7 files changed, 40 insertions, 9 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 1d50baf..3dd194b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -266,7 +266,7 @@ void QDeclarativeFlickablePrivate::flickY(qreal velocity) flick(vData, q->minYExtent(), q->maxYExtent(), q->height(), fixupY_callback, velocity); } -void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, +void QDeclarativeFlickablePrivate::flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal, QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity) { Q_Q(QDeclarativeFlickable); diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index 28dfea9..47a15cb 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -225,9 +225,35 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*"); prop.setWritable(false); } else { + QByteArray propType = type; + if (t >= QVariant::UserType || t == QVariant::Invalid) { + //copy of QDeclarativeObjectScriptClass::enumType() + QByteArray scope; + QByteArray name; + int scopeIdx = propType.lastIndexOf("::"); + if (scopeIdx != -1) { + scope = propType.left(scopeIdx); + name = propType.mid(scopeIdx + 2); + } else { + name = propType; + } + const QMetaObject *meta; + if (scope == "Qt") + meta = &QObject::staticQtMetaObject; + else + meta = parent->parent()->metaObject(); //### assumes parent->parent() + for (int i = meta->enumeratorCount() - 1; i >= 0; --i) { + QMetaEnum m = meta->enumerator(i); + if ((m.name() == name) && (scope.isEmpty() || (m.scope() == scope))) { + t = QVariant::Int; + propType = "int"; + break; + } + } + } if (QDeclarativeMetaType::canCopy(t)) { types[ii] = t; - QMetaPropertyBuilder prop = mob.addProperty(name, type); + QMetaPropertyBuilder prop = mob.addProperty(name, propType); prop.setWritable(false); } else { types[ii] = 0x80000000 | t; diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index dc3ecca..9eecc65 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -54,7 +54,15 @@ #include <QtCore/qvarlengtharray.h> #include <QtScript/qscriptcontextinfo.h> -Q_DECLARE_METATYPE(QScriptValue); +Q_DECLARE_METATYPE(QScriptValue) + +#if defined(__GNUC__) +# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 +// The code in this file does not violate strict aliasing, but GCC thinks it does +// so turn off the warnings for us to have a clean build +# pragma GCC diagnostic ignored "-Wstrict-aliasing" +# endif +#endif QT_BEGIN_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 0dd0edb..7f74da4 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -1029,7 +1029,7 @@ bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, i else v = QVariant(menum.keyToValue(value.toByteArray())); } else if (v.userType() != QVariant::Int && v.userType() != QVariant::UInt) { - int enumMetaTypeId = QMetaType::type(QByteArray(menum.scope()) + "::" + menum.name()); + int enumMetaTypeId = QMetaType::type(QByteArray(menum.scope() + QByteArray("::") + menum.name())); if ((enumMetaTypeId == 0) || (v.userType() != enumMetaTypeId) || !v.constData()) return false; v = QVariant(*reinterpret_cast<const int *>(v.constData())); diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index 6a0226f..dc941e2 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -791,7 +791,7 @@ void QMetaObjectBuilder::addMetaObject } if ((members & StaticMetacall) != 0) { - if (priv(prototype->d.data)->revision >= 2) { + if (priv(prototype->d.data)->revision >= 6) { const QMetaObjectExtraData *extra = (const QMetaObjectExtraData *)(prototype->d.extradata); if (extra && extra->static_metacall) diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h index 2678bff..d7085f8 100644 --- a/src/declarative/qml/qmetaobjectbuilder_p.h +++ b/src/declarative/qml/qmetaobjectbuilder_p.h @@ -169,7 +169,7 @@ public: int indexOfEnumerator(const QByteArray& name); int indexOfClassInfo(const QByteArray& name); - typedef int (*StaticMetacallFunction)(QMetaObject::Call, int, void **); + typedef QMetaObjectExtraData::StaticMetacallFunction StaticMetacallFunction; QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction() const; void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value); diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index fb77ec3..61b2d34 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -1301,9 +1301,6 @@ int NestedListModel::count() const void NestedListModel::clear() { - _rolesOk = false; - roleStrings.clear(); - if (_root) _root->clear(); } |