diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-01-13 02:20:11 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-01-13 02:23:50 (GMT) |
commit | 05adc294d063171d9d0accf819826684813d396a (patch) | |
tree | 3faded5e3483b6bc22857a148db1c2ae5ab42a90 /src/declarative/util | |
parent | 24a7d8559f291c9ff565142bf3a7a230dccb6c63 (diff) | |
download | Qt-05adc294d063171d9d0accf819826684813d396a.zip Qt-05adc294d063171d9d0accf819826684813d396a.tar.gz Qt-05adc294d063171d9d0accf819826684813d396a.tar.bz2 |
Remove QByteArray constructor from QmlComponent.
It was too easily confused with the QString constructor that had
completely different semantics. Use setData() instead.
Task-number: QTBUG-6590
Diffstat (limited to 'src/declarative/util')
-rw-r--r-- | src/declarative/util/qmlview.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/declarative/util/qmlview.cpp b/src/declarative/util/qmlview.cpp index b5f33f2..690924f 100644 --- a/src/declarative/util/qmlview.cpp +++ b/src/declarative/util/qmlview.cpp @@ -290,7 +290,8 @@ void QmlView::execute() if (d->qml.isEmpty()) { d->component = new QmlComponent(&d->engine, d->source, this); } else { - d->component = new QmlComponent(&d->engine, d->qml.toUtf8(), d->source, this); + d->component = new QmlComponent(&d->engine, this); + d->component->setData(d->qml.toUtf8(), d->source); } connect (&d->engine, SIGNAL (quit ()), this, SIGNAL (quit ())); @@ -485,7 +486,8 @@ QmlGraphicsItem* QmlView::addItem(const QString &qml, QmlGraphicsItem* parent) if (!d->root) return 0; - QmlComponent component(&d->engine, qml.toUtf8(), QUrl()); + QmlComponent component(&d->engine); + component.setData(qml.toUtf8(), QUrl()); if(d->component->isError()) { QList<QmlError> errorList = d->component->errors(); foreach (const QmlError &error, errorList) { |