~renatofilho/address-book-app/fix-1420851

« back to all changes in this revision

Viewing changes to src/imports/Ubuntu/Contacts/ContactPreviewPage.qml

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2015-02-12 16:51:01 UTC
  • Revision ID: renato.filho@canonical.com-20150212165101-e4oi3ngvwqxhprsh
Create the pageTitle property on ContactPreviewPage to help on tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
    property QtObject contact: null
29
29
    property alias extensions: extensionsContents.children
 
30
    readonly property alias pageTitle: _pageTitle.text
 
31
 
30
32
    title: " "
31
 
 
32
33
    // Use a external label to allows us to set the property "textFormat", and
33
34
    // avoid problems with html text
34
35
    head.contents: Label {
35
 
        id: pageTitle
 
36
        id: _pageTitle
36
37
 
37
38
        text: ContactsJS.formatToDisplay(contact, i18n.dtr("address-book-app", "No name"))
38
39
        textFormat: Text.PlainText
47
48
    Connections {
48
49
        target: contact
49
50
        onContactChanged: {
50
 
            pageTitle.text = ContactsJS.formatToDisplay(contact, i18n.dtr("address-book-app", "No name"))
 
51
            _pageTitle.text = ContactsJS.formatToDisplay(contact, i18n.dtr("address-book-app", "No name"))
51
52
        }
52
53
    }
53
54