summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/qml/qdeclarativecontext.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index ab3849a..f801a88 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -363,18 +363,8 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const
bool QDeclarativeContext::isSafeOrigin(const QUrl &src) const
{
- if (src.isRelative())
- return true;
- if (src.scheme()==QLatin1String("https"))
- return true;
-
- QUrl base = baseUrl();
- if (src.host() == base.host() && src.port() == base.port()) // including files (with no host)
- return true;
-
- qWarning() << src << "is not a safe origin from" << base;
-
- return false;
+ Q_D(const QDeclarativeContext);
+ return !d->data->engine || d->data->engine->isSafeOrigin(src, baseUrl());
}
/*!