aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-11-21 10:34:41 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-11-21 10:34:41 +0100
commitc08ec43406c4ebe2e93942a8b07871c73aafde51 (patch)
tree69e84f955ce6d0f66d39eae36b07ae0f8ef65e56 /src/qml
parent242067390f3bd891b162164a2d01a3a982c64fa2 (diff)
parent5b82c1b7abc515274e6348136356bbf8f1374e4a (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/src/external-resources.qdoc7
-rw-r--r--src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc3
-rw-r--r--src/qml/qml/qqmlengine.cpp3
-rw-r--r--src/qml/qml/v8/qqmlbuiltinfunctions.cpp22
4 files changed, 30 insertions, 5 deletions
diff --git a/src/qml/doc/src/external-resources.qdoc b/src/qml/doc/src/external-resources.qdoc
index 202d1e4ae2..63f59bf3be 100644
--- a/src/qml/doc/src/external-resources.qdoc
+++ b/src/qml/doc/src/external-resources.qdoc
@@ -31,6 +31,11 @@
*/
/*!
+ \externalpage http://qmlbook.github.io/
+ \title Qt5 Cadaques
+*/
+
+/*!
\externalpage http://www.w3schools.com/jsref/default.asp
\title W3Schools JavaScript Reference
*/
@@ -38,4 +43,4 @@
/*!
\externalpage https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
\title Mozilla Developer Network Date Reference
-*/ \ No newline at end of file
+*/
diff --git a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
index a8177d29d8..c0b74c4fc6 100644
--- a/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
+++ b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc
@@ -564,8 +564,7 @@ list of \l {Item::children}{children}.
Default properties can be useful for reassigning the children of an item. See
the \l{TabWidget Example}, which uses a default property to
automatically reassign children of the TabWidget as children of an inner
-ListView.
-
+ListView. See also \l {Extending QML}.
\section3 Read-Only Properties
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index ae7c0cf8fb..4da19a5a5c 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -2393,6 +2393,9 @@ bool QQml_isFileCaseCorrect(const QString &fileName, int lengthIn /* = -1 */)
#if defined(Q_OS_MAC) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
const QString canonical = info.canonicalFilePath();
#elif defined(Q_OS_WIN)
+ // No difference if the path is qrc based
+ if (absolute[0] == QLatin1Char(':'))
+ return true;
const QString canonical = shellNormalizeFileName(absolute);
#endif
diff --git a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
index b0e490b5c9..e859224aea 100644
--- a/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
+++ b/src/qml/qml/v8/qqmlbuiltinfunctions.cpp
@@ -434,11 +434,16 @@ Returns a Matrix4x4 with the specified values.
Alternatively, the function may be called with a single argument
where that argument is a JavaScript array which contains the sixteen
matrix values.
+Finally, the function may be called with no arguments and the resulting
+matrix will be the identity matrix.
*/
ReturnedValue QtObject::method_matrix4x4(QV4::CallContext *ctx)
{
QV4::ExecutionEngine *v4 = ctx->d()->engine;
+ if (ctx->argc() == 0)
+ return ctx->engine()->fromVariant(QQml_valueTypeProvider()->createValueType(QMetaType::QMatrix4x4, 0, Q_NULLPTR));
+
if (ctx->argc() == 1 && ctx->args()[0].isObject()) {
bool ok = false;
QVariant v = QQml_valueTypeProvider()->createVariantFromJsObject(QMetaType::QMatrix4x4, QQmlV4Handle(ctx->args()[0]), v4, &ok);
@@ -1069,10 +1074,23 @@ If the optional \a mode parameter is set to \c Component.Asynchronous, the
component will be loaded in a background thread. The Component::status property
will be \c Component.Loading while it is loading. The status will change to
\c Component.Ready if the component loads successfully, or \c Component.Error
-if loading fails.
+if loading fails. This parameter defaults to \c Component.PreferSynchronous
+if omitted.
+
+If \a mode is set to \c Component.PreferSynchronous, Qt will attempt to load
+the component synchronously, but may end up loading it asynchronously if
+necessary. Scenarios that may cause asynchronous loading include, but are not
+limited to, the following:
+
+\list
+\li The URL refers to a network resource
+\li The component is being created as a result of another component that is
+being loaded asynchronously
+\endlist
If the optional \a parent parameter is given, it should refer to the object
-that will become the parent for the created \l Component object.
+that will become the parent for the created \l Component object. If no mode
+was passed, this can be the second argument.
Call \l {Component::createObject()}{Component.createObject()} on the returned
component to create an object instance of the component.