summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-03-28 23:18:16 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-03-28 23:18:16 (GMT)
commitbd0e2aa6c99747551966fb787ea86c21f426a791 (patch)
tree8c3de7b8aa0cf856633934f3df5adaa2bdcd0d7a /src/declarative/qml/qdeclarativeengine.cpp
parent0a114cf91058e215f4b6f8bbea09aa9e9ad57069 (diff)
parent6cce231a2d8da6fb232908a8c815ba3a433cfad7 (diff)
downloadQt-bd0e2aa6c99747551966fb787ea86c21f426a791.zip
Qt-bd0e2aa6c99747551966fb787ea86c21f426a791.tar.gz
Qt-bd0e2aa6c99747551966fb787ea86c21f426a791.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 2f0ec24..dea5a40 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -580,13 +580,13 @@ void QDeclarativeEngine::removeImageProvider(const QString &providerId)
delete d->imageProviders.take(providerId);
}
-QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url)
+QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *size, const QSize& req_size)
{
QMutexLocker locker(&mutex);
QImage image;
QDeclarativeImageProvider *provider = imageProviders.value(url.host());
if (provider)
- image = provider->request(url.path().mid(1));
+ image = provider->request(url.path().mid(1), size, req_size);
return image;
}
@@ -1405,7 +1405,9 @@ struct QDeclarativeEnginePrivate::ImportedNamespace {
foreach (const QDeclarativeDirParser::Component &c, qmldircomponents) {
if (c.typeName == typeName) {
typeWasDeclaredInQmldir = true;
- if (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion)) {
+
+ // importing version -1 means import ALL versions
+ if ((vmaj == -1) || (c.majorVersion < vmaj || (c.majorVersion == vmaj && vmin >= c.minorVersion))) {
QUrl candidate = url.resolved(QUrl(c.fileName));
if (c.internal && base) {
if (base->resolved(QUrl(c.fileName)) != candidate)
@@ -1494,10 +1496,10 @@ public:
QStringList paths;
- if (!base.isEmpty()) {
- QString baseDir = QFileInfo(toLocalFileOrQrc(base)).path();
- paths += baseDir;
- }
+// if (!base.isEmpty()) {
+// QString baseDir = QFileInfo(toLocalFileOrQrc(base)).path();
+// paths += baseDir;
+// }
QString applicationDirPath = QCoreApplication::applicationDirPath();
if (!applicationDirPath.isEmpty())
@@ -1557,9 +1559,9 @@ public:
// user import paths
QStringList paths;
// base..
- QString localFileOrQrc = toLocalFileOrQrc(base);
- QString localFileOrQrcPath = QFileInfo(localFileOrQrc).path();
- paths += localFileOrQrcPath;
+// QString localFileOrQrc = toLocalFileOrQrc(base);
+// QString localFileOrQrcPath = QFileInfo(localFileOrQrc).path();
+// paths += localFileOrQrcPath;
paths += QDeclarativeEnginePrivate::get(engine)->fileImportPath;
QString applicationDirPath = QCoreApplication::applicationDirPath();