summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-10-08 06:05:02 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-10-08 06:05:02 (GMT)
commit15c31bb195d02e1bb489c1aff5f93f1cb829f51f (patch)
tree9d2356cd64c327f8c1fd1d34644568d829d12c2c /src
parent5525a2f1216b03b8a226d4c1d7817024f1010019 (diff)
downloadQt-15c31bb195d02e1bb489c1aff5f93f1cb829f51f.zip
Qt-15c31bb195d02e1bb489c1aff5f93f1cb829f51f.tar.gz
Qt-15c31bb195d02e1bb489c1aff5f93f1cb829f51f.tar.bz2
Add url() for setUrl().
Diffstat (limited to 'src')
-rw-r--r--src/declarative/util/qmlview.cpp10
-rw-r--r--src/declarative/util/qmlview.h1
2 files changed, 11 insertions, 0 deletions
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();