diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-13 13:06:33 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-10-13 13:06:33 (GMT) |
commit | 28ef9731df2b3cd865af89cc474c5fa20c24e492 (patch) | |
tree | e02172bc3cc68f9b46be40e3a6b4d94bd8fbaf07 /src/corelib | |
parent | 271c231bbc6a5376d557378c425e6c35299fb88b (diff) | |
parent | 0f81945563441082551c65f964531c16e185d3de (diff) | |
download | Qt-28ef9731df2b3cd865af89cc474c5fa20c24e492.zip Qt-28ef9731df2b3cd865af89cc474c5fa20c24e492.tar.gz Qt-28ef9731df2b3cd865af89cc474c5fa20c24e492.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (32 commits)
Fix autotest on windows
Fix worker ListModels to property emit countChanged()
Update color type docs to mention transparency
Update reference bitmaps used in bitmap comparison tests to follow changes in Text painting
Fix alignment bugs in Text element
Remove debug code added by 650a0078e2cef43eff107fe8d2505f64a0bfedf0
Compile on WinCE
Update QtDeclarative def files
Update QtCore def files
Compile on MSVC2008
Bug: TextEdit ignores plain text format when pasting text
Update sections if model content changes.
Fix autotest on windows
Test for absent qmldir
Allow objectName to be used in QML bindings
Install the declarative objectNameChanged callback
Don't give focus to a FocusScope that has had focus explicitly cleared.
Add a declarative callback for when a QObject's objectName changes
Ensure GridView header is visible at the top of the view.
Allow aliases to value type properties
...
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/kernel/qobject.cpp | 6 | ||||
-rw-r--r-- | src/corelib/kernel/qobject_p.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 8330e47..579c225 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -127,6 +127,7 @@ extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *) void (*QAbstractDeclarativeData::destroyed)(QAbstractDeclarativeData *, QObject *) = 0; void (*QAbstractDeclarativeData::parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *) = 0; +void (*QAbstractDeclarativeData::objectNameChanged)(QAbstractDeclarativeData *, QObject *) = 0; QObjectData::~QObjectData() {} @@ -1094,7 +1095,12 @@ QString QObject::objectName() const void QObject::setObjectName(const QString &name) { Q_D(QObject); + bool objectNameChanged = d->declarativeData && d->objectName != name; + d->objectName = name; + + if (objectNameChanged) + d->declarativeData->objectNameChanged(d->declarativeData, this); } diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h index 4800e6a..814769c 100644 --- a/src/corelib/kernel/qobject_p.h +++ b/src/corelib/kernel/qobject_p.h @@ -89,6 +89,7 @@ class Q_CORE_EXPORT QAbstractDeclarativeData public: static void (*destroyed)(QAbstractDeclarativeData *, QObject *); static void (*parentChanged)(QAbstractDeclarativeData *, QObject *, QObject *); + static void (*objectNameChanged)(QAbstractDeclarativeData *, QObject *); }; class Q_CORE_EXPORT QObjectPrivate : public QObjectData |