Subsurface-mobile status update

Dirk Hohndel dirk at hohndel.org
Mon Aug 15 15:57:01 UTC 2016


> On Aug 15, 2016, at 7:50 AM, Marco Martin <notmart at gmail.com> wrote:
> 
> On Monday 15 August 2016, Dirk Hohndel wrote:
>> Line numbers in kirigamiplugin.cpp are slightly off since I have a few
>> lines of debug output in there; frame #9 is foreach (const QString &style,
>> m_stylesFallbackChain) {
>> frame #10 is
>> 	qmlRegisterSingletonType(componentPath(QStringLiteral("Theme.qml")), uri,
>> 1, 0, "Theme");
>> 
>> /D
> 
> as that list ended up to always be 2 at most, i may try to simplify that, but 
> if it's really a crash during a simple foreach of a string list, suggests 
> there may be something else..

Agreed. That's why I was saying it's an init issue.

I have now super-simplified the functions, removed all the nested calls and turned
them into direct registration calls:

    qmlRegisterSingletonType(QStringLiteral("qrc:///styles/Plasma/Theme.qml"), uri, 1, 0, "Theme");
    qmlRegisterSingletonType(QStringLiteral("qrc:///styles/Plasma/Units.qml"), uri, 1, 0, "Theme");

    qmlRegisterType(QStringLiteral("qrc:///Action.qml"), uri, 1, 0, "Action");
    qmlRegisterType(QStringLiteral("qrc:///AbstractApplicationHeader.qml"), uri, 1, 0, "AbstractApplicationHeader");
    qmlRegisterType(QStringLiteral("qrc:///AbstractApplicationWindow.qml"), uri, 1, 0, "AbstractApplicationWindow");
...
    qmlRegisterType(QStringLiteral("qrc:///Icon.qml"), uri, 1, 0, "Icon");
    qmlRegisterType(QStringLiteral("qrc:///Label.qml"), uri, 1, 0, "Label");
    qmlRegisterType(QStringLiteral("qrc:///OverlaySheet.qml"), uri, 1, 0, "OverlaySheet");
    qmlRegisterType(QStringLiteral("qrc:///Page.qml"), uri, 1, 0, "Page"); 
...
etc

This no longer crashes, but now the app fails with

QQmlApplicationEngine failed to load component
qrc:///qml/main.qml:350 Type DiveDetails unavailable
qrc:///qml/DiveDetails.qml:219 Type Kirigami.OverlaySheet unavailable
qrc:///OverlaySheet.qml:-1 File not found

Which is strange because at that time it appears to have successfully loaded Page.qml (since the 
outermost item in DiveDetails.qml is a Kirigami.Page). So why would if find one and not the other?

/D


More information about the Plasma-devel mailing list