aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml')
-rw-r--r--src/qml/doc/src/javascript/hostenvironment.qdoc4
-rw-r--r--src/qml/memory/qv4mm.cpp3
-rw-r--r--src/qml/qml/qqmlcomponent.cpp7
3 files changed, 10 insertions, 4 deletions
diff --git a/src/qml/doc/src/javascript/hostenvironment.qdoc b/src/qml/doc/src/javascript/hostenvironment.qdoc
index e613c4fcfb..de8b967d72 100644
--- a/src/qml/doc/src/javascript/hostenvironment.qdoc
+++ b/src/qml/doc/src/javascript/hostenvironment.qdoc
@@ -110,7 +110,7 @@ console.log("Result: " + a);
\endcode
Any attempt to modify the global object - either implicitly or explicitly - will
-cause an exception. If uncaught, this will result in an warning being printed,
+cause an exception. If uncaught, this will result in a warning being printed,
that includes the file and line number of the offending code.
\li Global code is run in a reduced scope.
@@ -120,7 +120,7 @@ code, it is executed in a scope that contains only the external file itself and
the global object. That is, it will not have access to the QML objects and
properties it \l {Scope and Naming Resolution}{normally would}.
-Global code that only accesses script local variable is permitted. This is an
+Global code that only accesses script local variables is permitted. This is an
example of valid global code.
\code
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp
index fe94a11082..f57d9059e3 100644
--- a/src/qml/memory/qv4mm.cpp
+++ b/src/qml/memory/qv4mm.cpp
@@ -48,6 +48,7 @@
#include <QTime>
#include <QMap>
+#include <QScopedValueRollback>
#include <iostream>
#include <cstdlib>
@@ -548,6 +549,8 @@ void MemoryManager::runGC()
return;
}
+ QScopedValueRollback<bool> gcBlocker(m_d->gcBlocked, true);
+
if (!m_d->gcStats) {
mark();
sweep();
diff --git a/src/qml/qml/qqmlcomponent.cpp b/src/qml/qml/qqmlcomponent.cpp
index c64851cac5..747be3cb7f 100644
--- a/src/qml/qml/qqmlcomponent.cpp
+++ b/src/qml/qml/qqmlcomponent.cpp
@@ -62,6 +62,7 @@
#include <private/qv4objectiterator_p.h>
#include <private/qv4qobjectwrapper_p.h>
+#include <QDir>
#include <QStack>
#include <QStringList>
#include <QThreadStorage>
@@ -550,7 +551,8 @@ QQmlComponent::QQmlComponent(QQmlEngine *engine, const QString &fileName,
{
Q_D(QQmlComponent);
d->engine = engine;
- d->loadUrl(d->engine->baseUrl().resolved(QUrl::fromLocalFile(fileName)));
+ const QUrl url = QDir::isAbsolutePath(fileName) ? QUrl::fromLocalFile(fileName) : d->engine->baseUrl().resolved(QUrl(fileName));
+ d->loadUrl(url);
}
/*!
@@ -566,7 +568,8 @@ QQmlComponent::QQmlComponent(QQmlEngine *engine, const QString &fileName,
{
Q_D(QQmlComponent);
d->engine = engine;
- d->loadUrl(d->engine->baseUrl().resolved(QUrl::fromLocalFile(fileName)), mode);
+ const QUrl url = QDir::isAbsolutePath(fileName) ? QUrl::fromLocalFile(fileName) : d->engine->baseUrl().resolved(QUrl(fileName));
+ d->loadUrl(url, mode);
}
/*!