/*! \qmlproperty QPlaceAttribute PlaceAttribute::attribute For details on how to use this property to interface between C++ and QML see "\l {location-cpp-qml.html#placeattribute} {Interfaces between C++ and QML Code}". */ void QDeclarativePlaceAttribute::setAttribute(const QPlaceAttribute &src) { QPlaceAttribute prevAttribute = m_attribute; m_attribute = src; if (m_attribute.label() != prevAttribute.label()) emit labelChanged(); if (m_attribute.text() != prevAttribute.text()) emit textChanged(); }
void tst_QPlaceAttribute::constructorTest() { QPlaceAttribute testObj; QPlaceAttribute *testObjPtr = new QPlaceAttribute(testObj); QVERIFY2(testObjPtr != NULL, "Copy constructor - null"); QVERIFY2(testObjPtr->label() == QString(), "Copy constructor - wrong label"); QVERIFY2(testObjPtr->text() == QString(), "Copy constructor - wrong text"); QVERIFY2(*testObjPtr == testObj, "Copy constructor - compare"); delete testObjPtr; }