652 item->setData(liststr, Qt::DisplayRole); |
652 item->setData(liststr, Qt::DisplayRole); |
653 m_otherdetailsmodel->appendRow(item); |
653 m_otherdetailsmodel->appendRow(item); |
654 |
654 |
655 // WLAN MAC |
655 // WLAN MAC |
656 |
656 |
657 TUint KPhoneWlanSeparator (':'); |
657 TBuf8<KWlanMacAddrLength> address; |
658 _LIT( KWLanMACDataFormat, "%02x"); |
658 // Fetch WLAN MAC address |
659 // Fetch WLAN MAC address |
659 RProperty::Get(KPSUidWlan,KPSWlanMacAddress,address); |
660 TBuf<KWlanMacAddrLength> address; |
660 TBuf<KWlanMacAddrLength> wlanMACAddress; |
661 RProperty::Get( KPSUidWlan, KPSWlanMacAddress, address ); |
661 for ( TInt i = 0; i < address.Length(); i++ ) |
662 // Format fetched address |
662 { |
663 TBuf<KWlanMacAddrLength> wlanMACAddress; |
663 TUint16 addbyte = address[i]; |
664 for ( TInt i( 0 ); i < address.Length(); i++ ) |
664 wlanMACAddress.AppendFormat(_L("%02X:"), addbyte); |
665 { |
665 } |
666 // Set separator |
666 if ( wlanMACAddress.Length() ) // remove trailing ':' |
667 if( i > 0 ) |
667 { |
668 { |
668 wlanMACAddress.Delete(wlanMACAddress.Length()-1, 1); |
669 wlanMACAddress.Append( KPhoneWlanSeparator ); |
669 } |
670 } |
|
671 // Set data |
|
672 TBuf<50> tmp; |
|
673 tmp.Format( KWLanMACDataFormat, address[i] ); |
|
674 wlanMACAddress.Append( tmp ); |
|
675 } |
|
676 liststr.clear(); |
670 liststr.clear(); |
677 item = new QStandardItem(); |
671 item = new QStandardItem(); |
678 val = hbTrId("txt_device_update_dblist_wlan_mac_address"); |
672 val = hbTrId("txt_device_update_dblist_wlan_mac_address"); |
679 liststr << val; |
673 liststr << val; |
680 str = QString::fromUtf16(wlanMACAddress.Ptr(), wlanMACAddress.Length()); |
674 str = QString::fromUtf16(wlanMACAddress.Ptr(), wlanMACAddress.Length()); |