diff options
Diffstat (limited to 'src/declarative/qml/qmlcompileddata.cpp')
-rw-r--r-- | src/declarative/qml/qmlcompileddata.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/declarative/qml/qmlcompileddata.cpp b/src/declarative/qml/qmlcompileddata.cpp index 9b931c5..8b165c6 100644 --- a/src/declarative/qml/qmlcompileddata.cpp +++ b/src/declarative/qml/qmlcompileddata.cpp @@ -45,9 +45,11 @@ #include "qmlcomponent_p.h" #include "qmlcontext.h" #include "qmlcontext_p.h" -#include <private/qobject_p.h> + #include <QtCore/qdebug.h> +#include <private/qobject_p.h> + QT_BEGIN_NAMESPACE int QmlCompiledData::pack(const char *data, size_t size) @@ -85,6 +87,16 @@ int QmlCompiledData::indexForByteArray(const QByteArray &data) return idx; } +int QmlCompiledData::indexForUrl(const QUrl &data) +{ + int idx = urls.indexOf(data); + if (idx == -1) { + idx = urls.count(); + urls << data; + } + return idx; +} + int QmlCompiledData::indexForFloat(float *data, int count) { Q_ASSERT(count > 0); |