Repeater in Tabs doesn't work

Bug #1295242 reported by Michael Spencer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu File Manager App
In Progress
Medium
Michael Spencer
Ubuntu UI Toolkit
Fix Released
Undecided
Zsombor Egri

Bug Description

It used to be possible to use a Repeater in Tabs, but now (with the same code), the app just renders a blank view with an empty title Header. This has caused a regression in the File Manager app, which was using a Repeater for multi-tab support.

Here is a sample application illustrating the bug:

import QtQuick 2.0
import Ubuntu.Components 0.1

MainView {

    width: units.gu(100)
    height: units.gu(75)

    Tabs {
        Repeater {
            model: 2
            delegate: Tab {
                title: "Tab " + index
                page: Page {
                    Label {
                        anchors.centerIn: parent
                        text: "Page " + index
                    }
                }
            }
        }
    }
}

Running this triggers the following error, which appears to be the reason why the code above doesn't work:

file:///usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/Components/Tabs.qml:335: TypeError: Cannot call method 'indexOf' of undefined

Related branches

Changed in ubuntu-filemanager-app:
status: New → Triaged
Changed in ubuntu-filemanager-app:
importance: Undecided → Critical
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → High
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
assignee: nobody → Zsombor Egri (zsombi)
importance: High → Undecided
Changed in ubuntu-filemanager-app:
assignee: nobody → rosa maria (rprosamaria383)
dobey (dobey)
Changed in ubuntu-filemanager-app:
assignee: rosa maria (rprosamaria383) → nobody
Revision history for this message
Riccardo Padovani (rpadovani) wrote :

I'm on trusty with ubuntu-sdk ppa.

The console error is still here, but the example code works well, and there is no blank screen.

Revision history for this message
Michael Spencer (ibelieve) wrote :

This is fixed in the SDK, so I will re-enable mutli-tab support in File Manager

Changed in ubuntu-filemanager-app:
assignee: nobody → Michael Spencer (mdspencer)
status: Triaged → In Progress
Revision history for this message
David Planella (dpm) wrote :

This bug has been marked as In progress for a while. Michael, would you mind updating the status if it's no longer in progress? Thanks!

Changed in ubuntu-filemanager-app:
importance: Critical → Medium
Changed in ubuntu-ui-toolkit:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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