summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-10-14 17:35:00 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-10-14 17:35:00 (GMT)
commit1637d135906296b2a32f17ed20c86869dc1667e8 (patch)
tree6912905d6d43d9838270a7af77d30d8b54c95b80 /src/corelib
parent17ff53f665ad5de15ce7b073edd1b10b2b397b05 (diff)
parentf103ad276181090da8c70bd29f4474ea7657e03f (diff)
downloadQt-1637d135906296b2a32f17ed20c86869dc1667e8.zip
Qt-1637d135906296b2a32f17ed20c86869dc1667e8.tar.gz
Qt-1637d135906296b2a32f17ed20c86869dc1667e8.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
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/qdatetime.cpp1
-rw-r--r--src/corelib/tools/qlinkedlist.cpp4
-rw-r--r--src/corelib/tools/qlist.cpp2
5 files changed, 11 insertions, 3 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
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index ab7530d..c252e64 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -1630,6 +1630,7 @@ QString QTime::toString(Qt::DateFormat format) const
\endtable
If the datetime is invalid, an empty string will be returned.
+ If \a format is empty, the default format "hh:mm:ss" is used.
\sa QDate::toString() QDateTime::toString()
*/
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 909d940..7213c6e 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 6cc6fc1..9ba3768 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.