Merge lp:~renatofilho/address-book-app/fix-1233785 into lp:address-book-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Merged at revision: 140
Proposed branch: lp:~renatofilho/address-book-app/fix-1233785
Merge into: lp:address-book-app
Diff against target: 53 lines (+6/-3)
3 files modified
src/imports/ContactEdit/ContactDetailWithTypeEditor.qml (+3/-2)
src/imports/ContactEdit/TextInputDetail.qml (+1/-0)
src/imports/ContactEdit/ValueSelector.qml (+2/-1)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/fix-1233785
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+205270@code.launchpad.net

Commit message

Handle read-only fields.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

approved

review: Approve
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Are there any related MPs required for this MP to build/function as expected? NO

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes) YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator? YES

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/address-book-app) on device or emulator? YES

If you changed the UI, was the change specified/approved by design? NO UI CHANGE

If you changed the packaging (debian), did you subscribe a core-dev to this MP? NO PACKAGE CHANGE

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/imports/ContactEdit/ContactDetailWithTypeEditor.qml'
2--- src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2013-11-22 01:05:52 +0000
3+++ src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2014-02-06 22:32:59 +0000
4@@ -71,13 +71,14 @@
5 focus: true
6 // disable listview mouse area
7 __mouseArea.visible: false
8-
9+ enabled: root.detail ? !root.detail.readOnly : false
10 implicitHeight: detailTypeSelector.height + fieldValues.height + units.gu(2)
11-
12+ opacity: enabled ? 1.0 : 0.5
13 ValueSelector {
14 id: detailTypeSelector
15 objectName: detail ? "type_" + detailToString(detail.type, -1) + "_" + index : ""
16
17+ readOnly: root.detail ? root.detail.readOnly : false
18 visible: (currentIndex != -1)
19 active: root.active
20 anchors {
21
22=== modified file 'src/imports/ContactEdit/TextInputDetail.qml'
23--- src/imports/ContactEdit/TextInputDetail.qml 2013-10-08 12:58:44 +0000
24+++ src/imports/ContactEdit/TextInputDetail.qml 2014-02-06 22:32:59 +0000
25@@ -31,6 +31,7 @@
26
27 Component.onCompleted: makeMeVisible(root)
28
29+ readOnly: detail ? detail.readOnly : true
30 focus: true
31 text: originalValue ? originalValue : ""
32 style: TextFieldStyle {
33
34=== modified file 'src/imports/ContactEdit/ValueSelector.qml'
35--- src/imports/ContactEdit/ValueSelector.qml 2013-11-22 00:47:10 +0000
36+++ src/imports/ContactEdit/ValueSelector.qml 2014-02-06 22:32:59 +0000
37@@ -20,6 +20,7 @@
38 Item {
39 id: root
40
41+ property bool readOnly: false
42 property bool active: false
43 property alias values: listView.model
44 property alias currentIndex: listView.currentIndex
45@@ -120,7 +121,7 @@
46 MouseArea {
47 anchors.fill: parent
48 propagateComposedEvents: true
49- onClicked: root.state = "expanded"
50+ onClicked: if (!readOnly) root.state = "expanded"
51 }
52
53 ListView {

Subscribers

People subscribed via source and target branches