Merge lp:~osomon/ubuntu-ui-extras/tabDelegate-objectName-index into lp:ubuntu-ui-extras

Proposed by Olivier Tilloy on 2017-03-22
Status: Needs review
Proposed branch: lp:~osomon/ubuntu-ui-extras/tabDelegate-objectName-index
Merge into: lp:ubuntu-ui-extras
Diff against target: 12 lines (+1/-1)
1 file modified
modules/Ubuntu/Components/Extras/TabsBar.qml (+1/-1)
To merge this branch: bzr merge lp:~osomon/ubuntu-ui-extras/tabDelegate-objectName-index
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing on 2017-05-17
Andrew Hayzen (community) 2017-03-22 Approve on 2017-03-22
Review via email:

Commit message

Ease QML testing of client apps by including the index of the tab delegate in its object name.

To post a comment you must log in.
Andrew Hayzen (ahayzen) wrote :

LGTM, I wonder if there is any performance difference between .arg() and just doing "tabDelegate_" + index

review: Approve
Olivier Tilloy (osomon) wrote :

I don’t know. I tend to use .arg() much more than plain string concatenation these days. I guess that would really matter if there were thousands of delegates, but that’s unlikely to ever happen with tabs, right?

Andrew Hayzen (ahayzen) wrote :

Yeah the difference is probably negligible :-)

Unmerged revisions

131. By Olivier Tilloy on 2017-03-22

Ease QML testing of client apps by including the index of the tab delegate in its object name.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Extras/TabsBar.qml'
2--- modules/Ubuntu/Components/Extras/TabsBar.qml 2017-01-16 15:31:24 +0000
3+++ modules/Ubuntu/Components/Extras/TabsBar.qml 2017-03-22 19:56:39 +0000
4@@ -190,7 +190,7 @@
5 model: tabsBar.model
6 delegate: MouseArea {
7 id: tabMouseArea
8- objectName: "tabDelegate"
9+ objectName: "tabDelegate_%1".arg(index)
11 acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
12 width: tab.width


People subscribed via source and target branches