diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 06:37:48 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-09 06:37:48 (GMT) |
commit | da8dda3a3b66fed6d5da878f3b4617aa0b5f3953 (patch) | |
tree | 120401a37b5364f3fde52bcb599c3c005e9d526a /src/declarative/qml | |
parent | 44efb487bbd2a9e4de416d566839cdffff1d69e2 (diff) | |
download | Qt-da8dda3a3b66fed6d5da878f3b4617aa0b5f3953.zip Qt-da8dda3a3b66fed6d5da878f3b4617aa0b5f3953.tar.gz Qt-da8dda3a3b66fed6d5da878f3b4617aa0b5f3953.tar.bz2 |
Remove QT_VERSION checks in QML
We only support Qt 4.7 now.
Diffstat (limited to 'src/declarative/qml')
5 files changed, 0 insertions, 45 deletions
diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp index ccf10c6..05e8d22 100644 --- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp +++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp @@ -55,13 +55,6 @@ QT_BEGIN_NAMESPACE -#if (QT_VERSION < QT_VERSION_CHECK(4, 7, 0)) -inline uint qHash(const QUrl &uri) -{ - return qHash(uri.toEncoded(QUrl::FormattingOption(0x100))); -} -#endif - QDeclarativeCompositeTypeData::QDeclarativeCompositeTypeData() : status(Invalid), errorType(NoError), component(0), compiledComponent(0) { diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 8905713..944abce 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -182,11 +182,9 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e) fileImportPath.append(canonicalPath); } } -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) QString builtinPath = QLibraryInfo::location(QLibraryInfo::ImportsPath); if (!builtinPath.isEmpty()) fileImportPath += builtinPath; -#endif filePluginPath += QLatin1String("."); diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h index 5a59ef8..4b27e53 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass_p.h +++ b/src/declarative/qml/qdeclarativeobjectscriptclass_p.h @@ -66,7 +66,6 @@ class QScriptContext; class QScriptEngine; class QDeclarativeContextData; -#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE) class Q_AUTOTEST_EXPORT QDeclarativeObjectMethodScriptClass : public QScriptDeclarativeClass { public: @@ -91,7 +90,6 @@ private: QDeclarativeEngine *engine; }; -#endif class Q_AUTOTEST_EXPORT QDeclarativeObjectScriptClass : public QScriptDeclarativeClass { @@ -132,10 +130,8 @@ protected: virtual QObject *toQObject(Object *, bool *ok = 0); private: -#if (QT_VERSION > QT_VERSION_CHECK(4, 6, 2)) || defined(QT_HAVE_QSCRIPTDECLARATIVECLASS_VALUE) friend class QDeclarativeObjectMethodScriptClass; QDeclarativeObjectMethodScriptClass methods; -#endif QDeclarativeTypeNameCache::Data *lastTNData; QDeclarativePropertyCache::Data *lastData; diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 49e7b79..261c84a 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -47,10 +47,6 @@ QT_BEGIN_NAMESPACE -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) -Q_DECLARE_METATYPE(QEasingCurve); -#endif - template<typename T> int qmlRegisterValueTypeEnums(const char *qmlName) { @@ -82,29 +78,18 @@ QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory() // ### Optimize for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) valueTypes[ii] = valueType(ii); -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - easingType = qMetaTypeId<QEasingCurve>(); - easingValueType = valueType(easingType); -#endif } QDeclarativeValueTypeFactory::~QDeclarativeValueTypeFactory() { for (unsigned int ii = 0; ii < (QVariant::UserType - 1); ++ii) delete valueTypes[ii]; -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - delete easingValueType; -#endif } bool QDeclarativeValueTypeFactory::isValueType(int idx) { if ((uint)idx < QVariant::UserType) return true; -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - if (idx == qMetaTypeId<QEasingCurve>()) - return true; -#endif return false; } @@ -116,9 +101,6 @@ void QDeclarativeValueTypeFactory::registerValueTypes() QDeclarativeValueType *QDeclarativeValueTypeFactory::operator[](int idx) const { -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - if (idx == easingType) return easingValueType; -#endif return valueTypes[idx]; } @@ -140,17 +122,11 @@ QDeclarativeValueType *QDeclarativeValueTypeFactory::valueType(int t) return new QDeclarativeRectFValueType; case QVariant::Vector3D: return new QDeclarativeVector3DValueType; -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) case QVariant::EasingCurve: return new QDeclarativeEasingValueType; -#endif case QVariant::Font: return new QDeclarativeFontValueType; default: -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - if (t == qMetaTypeId<QEasingCurve>()) - return new QDeclarativeEasingValueType; -#endif return 0; } } @@ -566,11 +542,7 @@ void QDeclarativeEasingValueType::write(QObject *obj, int idx, QDeclarativePrope QVariant QDeclarativeEasingValueType::value() { -#if (QT_VERSION >= QT_VERSION_CHECK(4,7,0)) return QVariant(easing); -#else - return QVariant::fromValue<QEasingCurve>(easing); -#endif } void QDeclarativeEasingValueType::setValue(QVariant value) diff --git a/src/declarative/qml/qdeclarativevaluetype_p.h b/src/declarative/qml/qdeclarativevaluetype_p.h index 763177d..5bfc27d 100644 --- a/src/declarative/qml/qdeclarativevaluetype_p.h +++ b/src/declarative/qml/qdeclarativevaluetype_p.h @@ -90,10 +90,6 @@ public: private: QDeclarativeValueType *valueTypes[QVariant::UserType - 1]; -#if (QT_VERSION < QT_VERSION_CHECK(4,7,0)) - int easingType; - QDeclarativeValueType *easingValueType; -#endif }; class Q_AUTOTEST_EXPORT QDeclarativePointFValueType : public QDeclarativeValueType |