77 m_address.setValueBypassingBindings(
new QDeclarativeGeoAddress(src.address(),
this));
92void QDeclarativeGeoLocation::setLocation(
const QGeoLocation &src)
94 if (m_address && m_address->parent() ==
this) {
95 m_address->setAddress(src.address());
96 }
else if (!m_address || m_address->parent() !=
this) {
97 m_address.setValue(
new QDeclarativeGeoAddress(src.address(),
this));
101 setCoordinate(src.coordinate());
102 setBoundingShape(src.boundingShape());
103 setExtendedAttributes(src.extendedAttributes());
106QGeoLocation QDeclarativeGeoLocation::location()
const
108 QGeoLocation retValue;
109 retValue.setAddress(m_address ? m_address->address() : QGeoAddress());
110 retValue.setCoordinate(m_coordinate);
111 retValue.setBoundingShape(m_boundingShape);
112 retValue.setExtendedAttributes(m_extendedAttributes);
121void QDeclarativeGeoLocation::setAddress(QDeclarativeGeoAddress *address)
123 m_address.removeBindingUnlessInWrapper();
125 const QDeclarativeGeoAddress *oldAddress = m_address.valueBypassingBindings();
126 if (oldAddress == address)
132 m_address.setValueBypassingBindings(address);
134 if (oldAddress && (oldAddress->parent() ==
this))