diff options
24 files changed, 18 insertions, 129 deletions
diff --git a/examples/declarative/modules/builtin-version.qml b/examples/declarative/modules/builtin-version.qml deleted file mode 100644 index 4aa63be..0000000 --- a/examples/declarative/modules/builtin-version.qml +++ /dev/null @@ -1,3 +0,0 @@ -import Qt 4.6 - -Rectangle {} diff --git a/examples/declarative/modules/installed-qualified.qml b/examples/declarative/modules/installed-qualified.qml deleted file mode 100644 index 3d40794..0000000 --- a/examples/declarative/modules/installed-qualified.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -import com.nokia.Foo as F -Item { - F.Bar { } -} diff --git a/examples/declarative/modules/installed-version.qml b/examples/declarative/modules/installed-version.qml deleted file mode 100644 index d90375dd..0000000 --- a/examples/declarative/modules/installed-version.qml +++ /dev/null @@ -1,9 +0,0 @@ -import Qt 4.6 - -import com.nokia.Foo 1.6 -import com.nokia.Foo 1.7 as NewFoo -Column { - Bar { } - Baz { } - NewFoo.Bar { } -} diff --git a/examples/declarative/modules/installed.qml b/examples/declarative/modules/installed.qml deleted file mode 100644 index a28fd10..0000000 --- a/examples/declarative/modules/installed.qml +++ /dev/null @@ -1,4 +0,0 @@ -import Qt 4.6 - -import com.nokia.Foo -Foo.Bar { } diff --git a/examples/declarative/modules/lib/com/nokia/Foo/Bar.qml b/examples/declarative/modules/lib/com/nokia/Foo/Bar.qml deleted file mode 100644 index 270cd46..0000000 --- a/examples/declarative/modules/lib/com/nokia/Foo/Bar.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 -Text { - text: "lib/com/nokia/Foo/Bar.qml" - color: "green" -} diff --git a/examples/declarative/modules/lib/com/nokia/Foo/Bar17.qml b/examples/declarative/modules/lib/com/nokia/Foo/Bar17.qml deleted file mode 100644 index f93fc62..0000000 --- a/examples/declarative/modules/lib/com/nokia/Foo/Bar17.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 -Text { - text: "lib/com/nokia/Foo/Bar17.qml" - color: "white" -} diff --git a/examples/declarative/modules/lib/com/nokia/Foo/Baz.qml b/examples/declarative/modules/lib/com/nokia/Foo/Baz.qml deleted file mode 100644 index 4daa37f..0000000 --- a/examples/declarative/modules/lib/com/nokia/Foo/Baz.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 -Text { - text: "lib/com/nokia/Foo/Baz.qml" - color: "red" -} diff --git a/examples/declarative/modules/lib/com/nokia/Foo/qmldir b/examples/declarative/modules/lib/com/nokia/Foo/qmldir deleted file mode 100644 index b8111cb..0000000 --- a/examples/declarative/modules/lib/com/nokia/Foo/qmldir +++ /dev/null @@ -1,6 +0,0 @@ -# Baz was introduced in Foo 1.6 -# Bar 1.5 and 1.6 are the same, but in 1.7 it is reimplemented. -Bar 1.5 Bar.qml -Bar 1.6 Bar.qml -Bar 1.7 Bar17.qml -Baz 1.6 Baz.qml diff --git a/examples/declarative/modules/local-qualified.qml b/examples/declarative/modules/local-qualified.qml deleted file mode 100644 index d3532af..0000000 --- a/examples/declarative/modules/local-qualified.qml +++ /dev/null @@ -1,9 +0,0 @@ -import Qt 4.6 - -import "local" as X -import "local/SubLib" as Y - -Column { - X.Foo { } - Y.Bar { } -} diff --git a/examples/declarative/modules/local.qml b/examples/declarative/modules/local.qml deleted file mode 100644 index c90bde3..0000000 --- a/examples/declarative/modules/local.qml +++ /dev/null @@ -1,4 +0,0 @@ -import Qt 4.6 - -import "local" -Foo { } diff --git a/examples/declarative/modules/local/Foo.qml b/examples/declarative/modules/local/Foo.qml deleted file mode 100644 index 6cb07d5..0000000 --- a/examples/declarative/modules/local/Foo.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -Text { - text: "lib/Foo.qml" - color: "#00ff00" -} diff --git a/examples/declarative/modules/local/SubLib/Bar.qml b/examples/declarative/modules/local/SubLib/Bar.qml deleted file mode 100644 index ad09d2e..0000000 --- a/examples/declarative/modules/local/SubLib/Bar.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -Text { - text: "lib/SubLib/Bar.qml" - color: "#8898FF" -} diff --git a/examples/declarative/modules/remote-qualified.qml b/examples/declarative/modules/remote-qualified.qml deleted file mode 100644 index 581c868..0000000 --- a/examples/declarative/modules/remote-qualified.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -import "http://qml.nokia.com/Clock.zip" -Item { - Clock.Hand { ... } -} diff --git a/examples/declarative/modules/remote-zipped.qml b/examples/declarative/modules/remote-zipped.qml deleted file mode 100644 index d325b65..0000000 --- a/examples/declarative/modules/remote-zipped.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -import "http://qml.nokia.com/Clock.zip" -Item { - Clock { ... } -} diff --git a/examples/declarative/modules/wrong-installed-version.qml b/examples/declarative/modules/wrong-installed-version.qml deleted file mode 100644 index 4442b11..0000000 --- a/examples/declarative/modules/wrong-installed-version.qml +++ /dev/null @@ -1,4 +0,0 @@ -import Qt 4.6 - -import com.nokia.Foo 1.5 -Baz { } // Not available in 1.5, only 1.6! diff --git a/examples/declarative/modules/wrong-installed.qml b/examples/declarative/modules/wrong-installed.qml deleted file mode 100644 index 317c05c..0000000 --- a/examples/declarative/modules/wrong-installed.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt 4.6 - -import com.nokia.NonExistent - -Rectangle {} diff --git a/examples/declarative/modules/wrong-local-qualified.qml b/examples/declarative/modules/wrong-local-qualified.qml deleted file mode 100644 index 868bebf..0000000 --- a/examples/declarative/modules/wrong-local-qualified.qml +++ /dev/null @@ -1,6 +0,0 @@ -import Qt 4.6 - -import "local" as X - -// WRONG: if imported qualified, must qualify -Foo { } diff --git a/examples/declarative/modules/wrong-local.qml b/examples/declarative/modules/wrong-local.qml deleted file mode 100644 index 1958659..0000000 --- a/examples/declarative/modules/wrong-local.qml +++ /dev/null @@ -1,8 +0,0 @@ -import Qt 4.6 - -import "local" - -// WRONG - cannot use qualification to access "local sublibraries". -// (would have to import lib.SubLib) -SubLib.Bar { -} diff --git a/examples/declarative/modules/zipped-qualified.qml b/examples/declarative/modules/zipped-qualified.qml deleted file mode 100644 index 56e329f..0000000 --- a/examples/declarative/modules/zipped-qualified.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt 4.6 - -// Not currently supported -import "zips/ClockPack.zip" as CP -Item { - CP.Clock { ... } -} diff --git a/examples/declarative/modules/zipped.qml b/examples/declarative/modules/zipped.qml deleted file mode 100644 index 4464616..0000000 --- a/examples/declarative/modules/zipped.qml +++ /dev/null @@ -1,7 +0,0 @@ -import Qt 4.6 - -// Not currently supported -import "zips/ClockPack.zip" -Item { - Clock { ... } -} diff --git a/src/declarative/extra/qmlfontloader.cpp b/src/declarative/extra/qmlfontloader.cpp index 5373d02..4497384 100644 --- a/src/declarative/extra/qmlfontloader.cpp +++ b/src/declarative/extra/qmlfontloader.cpp @@ -175,15 +175,17 @@ QmlFontLoader::Status QmlFontLoader::status() const void QmlFontLoader::replyFinished() { Q_D(QmlFontLoader); - if (!d->reply->error()) { - QByteArray ba = d->reply->readAll(); - d->addFontToDatabase(ba); - } else { - d->status = Error; - emit statusChanged(); + if (d->reply) { + if (!d->reply->error()) { + QByteArray ba = d->reply->readAll(); + d->addFontToDatabase(ba); + } else { + d->status = Error; + emit statusChanged(); + } + d->reply->deleteLater(); + d->reply = 0; } - d->reply->deleteLater(); - d->reply = 0; } void QmlFontLoaderPrivate::addFontToDatabase(const QByteArray &ba) diff --git a/src/declarative/fx/qfxtext.cpp b/src/declarative/fx/qfxtext.cpp index 7c7b3b0..c26ed2c 100644 --- a/src/declarative/fx/qfxtext.cpp +++ b/src/declarative/fx/qfxtext.cpp @@ -750,7 +750,7 @@ void QFxText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) if (needClip) { p->save(); - p->setClipRect(boundingRect()); + p->setClipRect(boundingRect(), Qt::IntersectClip); } p->drawPixmap(x, y, d->imgCache); if (needClip) diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index 9e12485..ce1bb93 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -151,7 +151,7 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data, const QUrl d->errors.clear(); d->imports.clear(); - QmlCompiledData component; + QmlCompiledData *component = new QmlCompiledData; QmlCompiler compiler; QmlCompositeTypeData *td = ((QmlEnginePrivate *)QmlEnginePrivate::get(engine))->typeManager.getImmediate(data, url); @@ -159,20 +159,23 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data, const QUrl if(td->status == QmlCompositeTypeData::Error) { d->errors = td->errors; td->release(); + component->release(); return false; } else if(td->status == QmlCompositeTypeData::Waiting) { QmlError error; error.setDescription(QLatin1String("QmlDomDocument supports local types only")); d->errors << error; td->release(); + component->release(); return false; } - compiler.compile(engine, td, &component); + compiler.compile(engine, td, component); if (compiler.isError()) { d->errors = compiler.errors(); td->release(); + component->release(); return false; } @@ -196,6 +199,7 @@ bool QmlDomDocument::load(QmlEngine *engine, const QByteArray &data, const QUrl d->root->addref(); } + component->release(); return true; } diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index 23c0639..4be5230 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -209,7 +209,7 @@ QmlEnginePrivate::~QmlEnginePrivate() clear(bindValues[ii]); for(int ii = 0; ii < parserStatus.count(); ++ii) clear(parserStatus[ii]); - for(QHash<int, QmlCompiledData*>::ConstIterator iter = m_compositeTypes.begin(); iter != m_compositeTypes.end(); ++iter) + for(QHash<int, QmlCompiledData*>::ConstIterator iter = m_compositeTypes.constBegin(); iter != m_compositeTypes.constEnd(); ++iter) (*iter)->release(); } |