Defining OptionSelectorDelegate outside of OptionSelector gives errors

Bug #1269019 reported by Tim Peeters
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Running this QML program gives a bunch of errors:

import QtQuick 2.0-
import Ubuntu.Components 0.1

MainView {
    width: 400
    height: 400

    OptionSelectorDelegate {
        id: testDelegate

        text: "TEST"
        subText: "test"
        constrainImage: true
    }
}

The problem is that the delegate assumes there is a listView property available, while it is not. The delegate would have to check for that property (and initialize when it is changed). Here are the errors:

tim@ideapad:~/dev/ubuntu-ui-toolkit/fix-1242647/tests/unit_x11/tst_components$ qmlscene tos.qml
unity::action::ActionManager::ActionManager(QObject*):
 Could not determine application identifier. HUD will not work properly.
 Provide your application identifier in $APP_ID environment variable.
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:220:9: QML Connections: Cannot assign to non-existent property "onCurrentlyExpandedChanged"
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:178: TypeError: Cannot read property 'multiSelection' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:114: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:221: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:262: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:294: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:325: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:143: ReferenceError: index is not defined
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:403: TypeError: Cannot read property 'expanded' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:393: TypeError: Cannot read property 'expanded' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:120: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:114: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:120: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:143: ReferenceError: index is not defined
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:221: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:262: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:294: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:325: TypeError: Cannot read property 'container' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:393: TypeError: Cannot read property 'expanded' of null
file:///home/tim/dev/ubuntu-ui-toolkit/fix-1242647/modules/Ubuntu/Components/OptionSelectorDelegate.qml:403: TypeError: Cannot read property 'expanded' of null
tim@ideapad:~/dev/ubuntu-ui-toolkit/fix-1242647/tests/unit_x11/tst_components$

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → Medium
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.