summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcomponent.h
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-07 03:28:56 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-07 03:28:56 (GMT)
commitf0062920559dd44f5f463ea4c3fa2657fceb81fb (patch)
tree58fd70afedd518c45d9e76847c889b805b07eb7f /src/declarative/qml/qmlcomponent.h
parent5972bfc6adaa32e4b21eb31a224346f143cbc530 (diff)
downloadQt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.zip
Qt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.tar.gz
Qt-f0062920559dd44f5f463ea4c3fa2657fceb81fb.tar.bz2
Improve QmlComponent API
Having to use QUrl::fromLocalFile() is crummy. Add appropriate overloads the QmlComponent, and resolve relative paths against a "base url" set on the QmlEngine.
Diffstat (limited to 'src/declarative/qml/qmlcomponent.h')
-rw-r--r--src/declarative/qml/qmlcomponent.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcomponent.h b/src/declarative/qml/qmlcomponent.h
index b29c123..5e6dce9 100644
--- a/src/declarative/qml/qmlcomponent.h
+++ b/src/declarative/qml/qmlcomponent.h
@@ -67,9 +67,10 @@ class Q_DECLARATIVE_EXPORT QmlComponent : public QObject
public:
QmlComponent(QObject *parent = 0);
QmlComponent(QmlEngine *, QObject *parent=0);
+ QmlComponent(QmlEngine *, const QString &url, QObject *parent = 0);
QmlComponent(QmlEngine *, const QUrl &url, QObject *parent = 0);
QmlComponent(QmlEngine *, const QByteArray &data,
- const QUrl &baseUrl=QUrl(), QObject *parent=0);
+ const QUrl &baseUrl, QObject *parent=0);
virtual ~QmlComponent();
Q_ENUMS(Status)
@@ -92,7 +93,7 @@ public:
virtual void completeCreate();
void loadUrl(const QUrl &url);
- void setData(const QByteArray &, const QUrl &baseUrl = QUrl());
+ void setData(const QByteArray &, const QUrl &baseUrl);
Q_SIGNALS:
void statusChanged(QmlComponent::Status);