equal
deleted
inserted
replaced
124 detail = new QContactAddress(address); |
124 detail = new QContactAddress(address); |
125 |
125 |
126 return detail; |
126 return detail; |
127 } |
127 } |
128 |
128 |
129 bool CntTransformAddress::supportsField(TUint32 fieldType) const |
|
130 { |
|
131 bool ret = false; |
|
132 if (fieldType == KUidContactFieldCountry.iUid || |
|
133 fieldType == KUidContactFieldPostcode.iUid || |
|
134 fieldType == KUidContactFieldAddress.iUid || |
|
135 fieldType == KUidContactFieldLocality.iUid || |
|
136 fieldType == KUidContactFieldRegion.iUid || |
|
137 fieldType == KUidContactFieldPostOffice.iUid) { |
|
138 ret = true; |
|
139 } |
|
140 return ret; |
|
141 } |
|
142 |
|
143 bool CntTransformAddress::supportsDetail(QString detailName) const |
129 bool CntTransformAddress::supportsDetail(QString detailName) const |
144 { |
130 { |
145 bool ret = false; |
131 bool ret = false; |
146 if (detailName == QContactAddress::DefinitionName) { |
132 if (detailName == QContactAddress::DefinitionName) { |
147 ret = true; |
133 ret = true; |
148 } |
134 } |
149 return ret; |
135 return ret; |
|
136 } |
|
137 |
|
138 QList<TUid> CntTransformAddress::supportedFields() const |
|
139 { |
|
140 return QList<TUid>() |
|
141 << KUidContactFieldAddress |
|
142 << KUidContactFieldLocality |
|
143 << KUidContactFieldRegion |
|
144 << KUidContactFieldPostcode |
|
145 << KUidContactFieldCountry |
|
146 << KUidContactFieldPostOffice; |
150 } |
147 } |
151 |
148 |
152 QList<TUid> CntTransformAddress::supportedSortingFieldTypes(QString detailFieldName) const |
149 QList<TUid> CntTransformAddress::supportedSortingFieldTypes(QString detailFieldName) const |
153 { |
150 { |
154 QList<TUid> uids; |
151 QList<TUid> uids; |
243 f.setAllowableValues(QVariantList() |
240 f.setAllowableValues(QVariantList() |
244 << QLatin1String(QContactDetail::ContextHome) |
241 << QLatin1String(QContactDetail::ContextHome) |
245 << QLatin1String(QContactDetail::ContextWork)); |
242 << QLatin1String(QContactDetail::ContextWork)); |
246 fields[QContactDetail::FieldContext] = f; |
243 fields[QContactDetail::FieldContext] = f; |
247 |
244 |
248 // Sub-types not supported in symbian back-end, remove |
245 // Sub-types not supported in symbian back-end |
249 fields.remove(QContactAddress::FieldSubTypes); |
246 fields.remove(QContactAddress::FieldSubTypes); |
|
247 |
250 d.setFields(fields); |
248 d.setFields(fields); |
251 |
249 |
252 // Replace original definitions |
250 // Replace original definitions |
253 definitions.insert(d.name(), d); |
251 definitions.insert(d.name(), d); |
254 } |
252 } |