From 15c31bb195d02e1bb489c1aff5f93f1cb829f51f Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 8 Oct 2009 16:05:02 +1000 Subject: Add url() for setUrl(). --- src/declarative/util/qmlview.cpp | 10 ++++++++++ src/declarative/util/qmlview.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp index f932e4a..14f8279 100644 --- a/src/declarative/util/qmlview.cpp +++ b/src/declarative/util/qmlview.cpp @@ -235,6 +235,16 @@ void QmlView::setUrl(const QUrl& url) } /*! + Returns the source URL, if set. + + \sa setUrl() + */ +QUrl QmlView::url() const +{ + return d->source; +} + +/*! Sets the source to the URL from the \a filename, and sets the QML string to \a qml. */ diff --git a/src/declarative/util/qmlview.h b/src/declarative/util/qmlview.h index b54101f..faf2564 100644 --- a/src/declarative/util/qmlview.h +++ b/src/declarative/util/qmlview.h @@ -70,6 +70,7 @@ public: virtual ~QmlView(); void setUrl(const QUrl&); + QUrl url() const; void setQml(const QString &qml, const QString &filename=QString()); QString qml() const; QmlEngine* engine(); -- cgit v0.12