summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-15 11:59:58 +0200
committerMorten Engvoldsen <morten.engvoldsen@nokia.com>2010-10-15 11:59:58 +0200
commit61f631aec52637b7bc019ab8b99bac0f657c3f2c (patch)
treef9d3d581a3c769065fb075820337dd49f3367173 /src/corelib
parente7d0747e31fbf0226a7cb639ca52f984cdd8d3ea (diff)
parentb3e90bb727cbdb9dbfaad8bc92c155180bbcf7ec (diff)
downloadqt4-tools-61f631aec52637b7bc019ab8b99bac0f657c3f2c.tar.gz
Merge branch '4.7' into mimir
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/kernel/qobject.cpp6
-rw-r--r--src/corelib/kernel/qobject_p.h1
-rw-r--r--src/corelib/tools/qlinkedlist.cpp4
-rw-r--r--src/corelib/tools/qlist.cpp2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 8330e474a9..579c225fc5 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 4800e6a020..814769cc33 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
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 909d940e6f..7213c6ef31 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -254,7 +254,7 @@ QLinkedListData QLinkedListData::shared_null = {
\sa insert()
*/
-/*!
+/*!
\fn bool QLinkedList::removeOne(const T &value)
\since 4.4
@@ -830,7 +830,7 @@ QLinkedListData QLinkedListData::shared_null = {
QLinkedList\<T\>::const_iterator allows you to iterate over a
QLinkedList\<T\>. If you want modify the QLinkedList as you iterate
- over it, you must use QLinkedList::const_iterator instead. It is
+ over it, you must use QLinkedList::iterator instead. It is
generally good practice to use QLinkedList::const_iterator on a
non-const QLinkedList as well, unless you need to change the
QLinkedList through the iterator. Const iterators are slightly
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 6cc6fc1657..9ba3768acb 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -936,7 +936,7 @@ void **QListData::erase(void **xi)
This function requires the value type to have an implementation of
\c operator==().
- Note that QList uses 0-based indexes, just like C++ arrays. Negative
+ Note that QList uses 0-based indexes, just like C++ arrays. Negative
indexes are not supported with the exception of the value mentioned
above.