Failure to load theme when images loaded before SDK components

Registered by Zsombor Egri on 2013-03-26

This blueprint has been superseded. See the newer blueprint "SDK: Theme Engine Improvements" for updated plans.

This bug was reported on TextArea embedding a scrollbar, where the scrollbar assets are not loaded depending on the order of the text area in its parent item.

Blueprint information

Status:
Complete
Approver:
Zoltan Balogh
Priority:
Undefined
Drafter:
Zsombor Egri
Direction:
Needs approval
Assignee:
Zsombor Egri
Definition:
Superseded
Series goal:
Accepted for raring
Implementation:
Unknown
Milestone target:
milestone icon ubuntu-13.04-month-6
Completed by
Zoltan Balogh on 2013-04-18

Whiteboard

Given the following simple 3 files, you get the following error when running Main.qml in qmlscene:

file:///usr/share/themes/Ambiance/qmltheme/ScrollbarDelegate.qml:449:13: QML Image: Cannot open: file:///usr/share/themes/Ambiance/qmltheme/artwork/ScrollbarBottomIdle.png
file:///usr/share/themes/Ambiance/qmltheme/ScrollbarDelegate.qml:445:13: QML Image: Cannot open: file:///usr/share/themes/Ambiance/qmltheme/artwork/ScrollbarTopIdle.png

(repeated several times)

Here's the files:

==== Main.qml ====

import QtQuick 2.0
Item {
    height: 100
    width: 400
    ImageItem {}
    TextItem {}
}

==== ImageItem.qml ====

import QtQuick 2.0
Image {}

==== TextItem.qml ====

import QtQuick 2.0
import Ubuntu.Components 0.1

TextArea {}

====================

If you switch the order of ImageItem and TextItem in Main.qml or "import Ubuntu.Components 0.1" from Main.qml, then the error doesn't appear anymore

(?)

Work Items

Work items:
Investigate the bug: TODO

This blueprint contains Public information 
Everyone can see this information.