diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 05:05:43 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-05-13 05:05:43 (GMT) |
commit | 8c6b5c53a2f6f8c9113fa616b458dde0be86a9e2 (patch) | |
tree | f3883fb4fce6227a9fe33a4d53449ffc4c4cf505 /src/declarative/qml | |
parent | 50711dd7aa22052eff58431d9f4e95e1a688047e (diff) | |
parent | d41ccae68683dd0d35c20affec7e5c55ce6bca37 (diff) | |
download | Qt-8c6b5c53a2f6f8c9113fa616b458dde0be86a9e2.zip Qt-8c6b5c53a2f6f8c9113fa616b458dde0be86a9e2.tar.gz Qt-8c6b5c53a2f6f8c9113fa616b458dde0be86a9e2.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (159 commits)
Doc: Adding loading image to search textbox
qdoc: Yet another revision of the top doc page.
Doc: Update on web template
Added QDateTime::msecsTo()
Doc: Fixed tables and images for the new docs
qdoc: Yet another revision of the top doc page.
Revert "Improve QUrl handling of local file paths"
Revert "[QNAM FTP] Check for the "ftp" scheme case-insensitively"
Revert "QUrl::fromLocalFile: fix silly mistake: it's fromNativeSeparators, not to"
Revert "Use QUrl::isLocalFile and fix the scheme checking in local URLs."
qdoc: Another revision of the top doc page.
Doc correction to css
Doc: Updates to the html template and javascript
tst_SuiteTest: Fix a meaningless switch statement
My 4.7.0 changelog entries.
qdoc: Fixed annotated list generation to use <td>, not <th>.
Doc: Tuning search script
qdoc: Reorganized examples panel.
Doc: Chages to search feature, css and table order
QtDeclarative: avoid waiting for a network load on URIs with empty schemes.
...
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativebinding_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecompiledbindings_p.h | 4 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecompositetypemanager.cpp | 39 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativecontext.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeguard_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeimport.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativepropertycache.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativescriptstring.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativestringconverters_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeworkerscript_p.h | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativexmlhttprequest.cpp | 6 |
12 files changed, 37 insertions, 30 deletions
diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 2d3acf5..598f09f 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -164,6 +164,6 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeBinding*); +Q_DECLARE_METATYPE(QDeclarativeBinding*) #endif // QDECLARATIVEBINDING_P_H diff --git a/src/declarative/qml/qdeclarativecompiledbindings_p.h b/src/declarative/qml/qdeclarativecompiledbindings_p.h index 29a1092..a9772cc 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings_p.h +++ b/src/declarative/qml/qdeclarativecompiledbindings_p.h @@ -104,8 +104,8 @@ protected: int qt_metacall(QMetaObject::Call, int, void **); private: - Q_DISABLE_COPY(QDeclarativeCompiledBindings); - Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings); + Q_DISABLE_COPY(QDeclarativeCompiledBindings) + Q_DECLARE_PRIVATE(QDeclarativeCompiledBindings) }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 19aac84..2a7d633 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -150,7 +150,7 @@ Q_SIGNALS: void destruction(); private: - friend class QDeclarativeContextData;; + friend class QDeclarativeContextData; friend class QDeclarativeComponentPrivate; }; diff --git a/src/declarative/qml/qdeclarativecompositetypemanager.cpp b/src/declarative/qml/qdeclarativecompositetypemanager.cpp index 0ea198d..b43b4d0 100644 --- a/src/declarative/qml/qdeclarativecompositetypemanager.cpp +++ b/src/declarative/qml/qdeclarativecompositetypemanager.cpp @@ -338,7 +338,7 @@ void QDeclarativeCompositeTypeManager::resourceReplyFinished() // WARNING, there is a copy of this function in qdeclarativeengine.cpp static QString toLocalFileOrQrc(const QUrl& url) { - if (url.scheme() == QLatin1String("qrc")) { + if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) { if (url.authority().isEmpty()) return QLatin1Char(':') + url.path(); return QString(); @@ -360,7 +360,10 @@ void QDeclarativeCompositeTypeManager::loadResource(QDeclarativeCompositeTypeRes } else { resource->status = QDeclarativeCompositeTypeResource::Error; } + } else if (url.scheme().isEmpty()) { + // We can't open this, so just declare as an error + resource->status = QDeclarativeCompositeTypeResource::Error; } else { QNetworkReply *reply = @@ -382,27 +385,29 @@ void QDeclarativeCompositeTypeManager::loadSource(QDeclarativeCompositeTypeData if (file.open(QFile::ReadOnly)) { QByteArray data = file.readAll(); setData(unit, data, url); - } else { - QString errorDescription; - // ### - Fill in error - errorDescription = QLatin1String("File error for URL ") + url.toString(); - unit->status = QDeclarativeCompositeTypeData::Error; - // ### FIXME - QDeclarativeError error; - error.setDescription(errorDescription); - unit->errorType = QDeclarativeCompositeTypeData::AccessError; - unit->errors << error; - doComplete(unit); + return; // success } - - } else { + } else if (!url.scheme().isEmpty()) { QNetworkReply *reply = engine->networkAccessManager()->get(QNetworkRequest(url)); QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); QObject::connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(requestProgress(qint64,qint64))); + return; // waiting } + + // error happened + QString errorDescription; + // ### - Fill in error + errorDescription = QLatin1String("File error for URL ") + url.toString(); + unit->status = QDeclarativeCompositeTypeData::Error; + // ### FIXME + QDeclarativeError error; + error.setDescription(errorDescription); + unit->errorType = QDeclarativeCompositeTypeData::AccessError; + unit->errors << error; + doComplete(unit); } void QDeclarativeCompositeTypeManager::requestProgress(qint64 received, qint64 total) @@ -716,8 +721,10 @@ void QDeclarativeCompositeTypeManager::compile(QDeclarativeCompositeTypeData *un } } - QUrl importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir"))); - if (toLocalFileOrQrc(importUrl).isEmpty()) + QUrl importUrl; + if (!unit->imports.baseUrl().scheme().isEmpty()) + importUrl = unit->imports.baseUrl().resolved(QUrl(QLatin1String("qmldir"))); + if (!importUrl.scheme().isEmpty() && toLocalFileOrQrc(importUrl).isEmpty()) resourceList.prepend(importUrl); for (int ii = 0; ii < resourceList.count(); ++ii) { diff --git a/src/declarative/qml/qdeclarativecontext.h b/src/declarative/qml/qdeclarativecontext.h index 548869c..d87123a 100644 --- a/src/declarative/qml/qdeclarativecontext.h +++ b/src/declarative/qml/qdeclarativecontext.h @@ -107,7 +107,7 @@ private: }; QT_END_NAMESPACE -Q_DECLARE_METATYPE(QList<QObject*>); +Q_DECLARE_METATYPE(QList<QObject*>) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativeguard_p.h b/src/declarative/qml/qdeclarativeguard_p.h index be60ce4..02fed0b 100644 --- a/src/declarative/qml/qdeclarativeguard_p.h +++ b/src/declarative/qml/qdeclarativeguard_p.h @@ -97,7 +97,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>); +Q_DECLARE_METATYPE(QDeclarativeGuard<QObject>) #include "private/qdeclarativedata_p.h" diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 65d42a1..576e048 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -57,7 +57,7 @@ DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES) static QString toLocalFileOrQrc(const QUrl& url) { - if (url.scheme() == QLatin1String("qrc")) { + if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) { if (url.authority().isEmpty()) return QLatin1Char(':') + url.path(); return QString(); diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index f04a706..839d79f 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -45,7 +45,7 @@ #include "private/qdeclarativebinding_p.h" #include <QtCore/qdebug.h> -Q_DECLARE_METATYPE(QScriptValue); +Q_DECLARE_METATYPE(QScriptValue) QT_BEGIN_NAMESPACE diff --git a/src/declarative/qml/qdeclarativescriptstring.h b/src/declarative/qml/qdeclarativescriptstring.h index 43bef44..fc92a9b 100644 --- a/src/declarative/qml/qdeclarativescriptstring.h +++ b/src/declarative/qml/qdeclarativescriptstring.h @@ -79,7 +79,7 @@ private: QT_END_NAMESPACE -Q_DECLARE_METATYPE(QDeclarativeScriptString); +Q_DECLARE_METATYPE(QDeclarativeScriptString) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h index 7afdfd3..97f72fc 100644 --- a/src/declarative/qml/qdeclarativestringconverters_p.h +++ b/src/declarative/qml/qdeclarativestringconverters_p.h @@ -80,7 +80,7 @@ namespace QDeclarativeStringConverters QSizeF Q_DECLARATIVE_EXPORT sizeFFromString(const QString &, bool *ok = 0); QRectF Q_DECLARATIVE_EXPORT rectFFromString(const QString &, bool *ok = 0); QVector3D Q_DECLARATIVE_EXPORT vector3DFromString(const QString &, bool *ok = 0); -}; +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeworkerscript_p.h b/src/declarative/qml/qdeclarativeworkerscript_p.h index 80ef5f3..dc73811 100644 --- a/src/declarative/qml/qdeclarativeworkerscript_p.h +++ b/src/declarative/qml/qdeclarativeworkerscript_p.h @@ -122,7 +122,7 @@ private: QT_END_NAMESPACE -QML_DECLARE_TYPE(QDeclarativeWorkerScript); +QML_DECLARE_TYPE(QDeclarativeWorkerScript) QT_END_HEADER diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 94205fe..80510f8 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -321,9 +321,9 @@ public: QT_END_NAMESPACE -Q_DECLARE_METATYPE(Node); -Q_DECLARE_METATYPE(NodeList); -Q_DECLARE_METATYPE(NamedNodeMap); +Q_DECLARE_METATYPE(Node) +Q_DECLARE_METATYPE(NodeList) +Q_DECLARE_METATYPE(NamedNodeMap) QT_BEGIN_NAMESPACE |