diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2011-11-28 13:05:33 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-12-01 17:46:57 +0100 |
commit | ba635d7e74472f3a54c0c4686966af46d9035c6f (patch) | |
tree | 70fb0b7e41cc1d0a9a5f3959eaf0cc771e9e74ca /src/corelib/kernel/qobject.h | |
parent | c7f80420649d8d37e25514bcd2859de1e21166d6 (diff) |
Add QObject::objectNameChanged(const QString &objectName) signal
This is sent when the object's name changes.
tst_moc must be updated since the method count of QObject has changed.
The test assumed that there were 4 invokable methods in QObject. The
new signal is the 5th, which breaks the test's assumptions. Fix this
as well.
tst_QObject must be updated since the
QObjectPrivate::isSignalConnected() method only supports the first 64
signals. With the addition of this new signal, sig61() in the test
becomes the 65th signal, and will always appear connected now.
Task-number: QTBUG-13999 (related)
Change-Id: Ie87893c71a231fafa7ccf2f16102238a7be8327a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.h')
-rw-r--r-- | src/corelib/kernel/qobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index 307518d81e..1865656d49 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -115,7 +115,7 @@ public: class Q_CORE_EXPORT QObject { Q_OBJECT - Q_PROPERTY(QString objectName READ objectName WRITE setObjectName) + Q_PROPERTY(QString objectName READ objectName WRITE setObjectName NOTIFY objectNameChanged) Q_DECLARE_PRIVATE(QObject) public: @@ -313,6 +313,7 @@ public: Q_SIGNALS: void destroyed(QObject * = 0); + void objectNameChanged(const QString &objectName); public: inline QObject *parent() const { return d_ptr->parent; } |