diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-05 03:46:28 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-05 03:46:28 (GMT) |
commit | 135a035362939b1c80d504e641f7dcb20f33a17b (patch) | |
tree | 169217ce34ba93ae225357796060bf3915524161 /src/declarative/qml/qmlengine.cpp | |
parent | 8fb2fde2e2474ae2175acdff15e559ed38bb2c38 (diff) | |
download | Qt-135a035362939b1c80d504e641f7dcb20f33a17b.zip Qt-135a035362939b1c80d504e641f7dcb20f33a17b.tar.gz Qt-135a035362939b1c80d504e641f7dcb20f33a17b.tar.bz2 |
Remove "to" limit on minor version.
QML_DEFINE_TYPE etc. now define just the initial support version, with
support in all future versions being thus implied.
QTBUG-5421
Diffstat (limited to 'src/declarative/qml/qmlengine.cpp')
-rw-r--r-- | src/declarative/qml/qmlengine.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 2926791..3df04b2 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE DEFINE_BOOL_CONFIG_OPTION(qmlDebugger, QML_DEBUGGER) DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE) -QML_DEFINE_TYPE(Qt,4,6,(QT_VERSION&0x00ff00)>>8,Object,QObject) +QML_DEFINE_TYPE(Qt,4,6,Object,QObject) struct StaticQtMetaObject : public QObject { @@ -993,17 +993,13 @@ struct QmlEnginePrivate::ImportedNamespace { if (line.isEmpty() || line.at(0) == QLatin1Char('#')) continue; if (line.startsWith(typespace)) { - // eg. 1.2-5 int space1 = line.indexOf(QLatin1Char(' ')); int space2 = space1 >=0 ? line.indexOf(QLatin1Char(' '),space1+1) : -1; QString mapversions = line.mid(space1+1,space2<0?line.length()-space1-1:space2-space1-1); int dot = mapversions.indexOf(QLatin1Char('.')); - int dash = mapversions.indexOf(QLatin1Char('-')); int mapvmaj = mapversions.left(dot).toInt(); - if (mapvmaj==vmaj) { - int mapvmin_from = (dash <= 0 ? mapversions.mid(dot+1) : mapversions.mid(dot+1,dash-dot-1)).toInt(); - int mapvmin_to = dash <= 0 ? mapvmin_from : mapversions.mid(dash+1).toInt(); - if (vmin >= mapvmin_from && vmin <= mapvmin_to) { + if (mapvmaj<=vmaj) { + if (mapvmaj<vmaj || vmin >= mapversions.mid(dot+1).toInt()) { QStringRef mapfile = space2<0 ? QStringRef() : line.midRef(space2+1,line.length()-space2-1); if (url_return) *url_return = url.resolved(mapfile.toString()); @@ -1172,9 +1168,8 @@ static QmlTypeNameCache *cacheForNamespace(QmlEngine *engine, const QmlEnginePri foreach (QmlType *type, types) { if (type->qmlTypeName().startsWith(base) && type->qmlTypeName().lastIndexOf('/') == (base.length() - 1) && - type->majorVersion() == major && type->minMinorVersion() <= minor && - type->maxMinorVersion() >= minor) { - + type->availableInVersion(major,minor)) + { QString name = QString::fromUtf8(type->qmlTypeName().mid(base.length())); cache->add(name, type); |