Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.3.1
-
None
-
Qt Creator 3.1.2 (opensource)
Based on Qt 5.3.1 (MSVC 2010, 32 bit)
Built on Jun 23 2014 at 04:13:10
From revision a791e851a7
-
8fab54a5495226b8c06d7708357a23e83444abc0 (qtdeclarative)
Description
Using a singleton type in QML like the following snippet
import QtQuick 2.0 pragma Singleton QtObject { property string foo: "foo" FontLoader { id: theFont source: "MyFontFile.ttf" } }
and saving it as MyType.qml, singleton type is registered using
qmlRegisterSingletonType(QUrl::fromLocalFile(QFileInfo("qml/MyType.qml").absoluteFilePath()), "MyNamespace", 1, 0, "MyTypeSingleton");
Accessing the "foo" property of the singleton somewhere else in QML like
import QtQuick 2.0 import MyNamespace 1.0 Text { text: MyTypeSingleton.foo }
causes strange error message, resulting in application crash :
ASSERT: "tdata->isComplete()" in file compiler\qqmlirbuilder.cpp, line 1819
Problem vanishes after replacing base type in MyType.qml "QtObject" by "Item" !?!?
Attachments
Issue Links
- relates to
-
QTBUG-41220 Windows: Assert in resolveQmlType in qtdeclarative\src\qml\compiler\qqmlirbuilder.cpp
- Closed