phonebookui/pbkcommonui/src/cntphonenumberviewitem.cpp
changeset 59 a642906a277a
parent 47 7cbcb2896f0e
child 66 554fe4dbbb59
--- a/phonebookui/pbkcommonui/src/cntphonenumberviewitem.cpp	Tue Jul 06 14:05:47 2010 +0300
+++ b/phonebookui/pbkcommonui/src/cntphonenumberviewitem.cpp	Wed Aug 18 09:39:00 2010 +0300
@@ -135,6 +135,12 @@
     connect( mItem->comboBox(), SIGNAL(currentIndexChanged(int)), this, SLOT(indexChanged(int)) );
     connect( mItem->editor(), SIGNAL(textChanged(QString)),this, SLOT(textChanged(QString)) );
     
+    // Naming UI components for automation testability
+    QString editorObjName = detail.definitionName() + " line edit %1";
+    mItem->editor()->setObjectName(editorObjName.arg(modelIndex().row()));
+    
+    QString comboBoxObjName = detail.definitionName() + " combo box %1";
+    mItem->comboBox()->setObjectName(comboBoxObjName.arg(modelIndex().row()));
     return mItem;
     }
 
@@ -157,6 +163,7 @@
         QContactPhoneNumber number;
         number.setSubTypes( aSubType );
         number.setContexts( aContext );
+        number.setNumber( mItem->editor()->text() );
         aItem->setDetail( number );
         }
     else