summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-02-04 06:56:55 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2011-02-04 06:56:55 (GMT)
commit6eda5790bc5ef3752589d7407efa63f86bba4bed (patch)
tree366458d7cdeae8b621bb14b99046ee54c8fbfe19 /src/declarative/qml
parent8611cf0ba0dbd0ddd742a02e1c60669e83cd1710 (diff)
parenta9f1eaa6a368bf7a72b52c428728a3e3e0a76209 (diff)
downloadQt-6eda5790bc5ef3752589d7407efa63f86bba4bed.zip
Qt-6eda5790bc5ef3752589d7407efa63f86bba4bed.tar.gz
Qt-6eda5790bc5ef3752589d7407efa63f86bba4bed.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 890f500..37df226 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -776,7 +776,7 @@ void QDeclarativeEngine::addImageProvider(const QString &providerId, QDeclarativ
{
Q_D(QDeclarativeEngine);
QMutexLocker locker(&d->mutex);
- d->imageProviders.insert(providerId, QSharedPointer<QDeclarativeImageProvider>(provider));
+ d->imageProviders.insert(providerId.toLower(), QSharedPointer<QDeclarativeImageProvider>(provider));
}
/*!
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index 560077f..f111c20 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -75,6 +75,16 @@ public:
invokes the appropriate image provider according to the providers that have
been registered through QDeclarativeEngine::addImageProvider().
+ Note that the identifiers are case-insensitive, but the rest of the URL will be passed on with
+ preserved case. For example, the below snippet would still specify that the image is loaded by the
+ image provider named "myimageprovider", but it would request a different image than the above snippet
+ ("Image.png" instead of "image.png").
+ \qml
+ Image { source: "image://MyImageProvider/Image.png" }
+ \endqml
+
+ If you want the rest of the URL to be case insensitive, you will have to take care
+ of that yourself inside your image provider.
\section2 An example