diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-31 16:46:11 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-08-04 14:29:34 (GMT) |
commit | d6e7238903d381bf2c2c9f89c17085e714384e87 (patch) | |
tree | b47b9969b15cdd9c4faf92011692864d8be655f9 /src/gui | |
parent | 9081e1e65681aab1c1d8a913b1a493fe1d37e837 (diff) | |
download | Qt-d6e7238903d381bf2c2c9f89c17085e714384e87.zip Qt-d6e7238903d381bf2c2c9f89c17085e714384e87.tar.gz Qt-d6e7238903d381bf2c2c9f89c17085e714384e87.tar.bz2 |
Reorganise QObjectPrivate so that it's easier to tell what's in it.
Also rename QDeclarativeData to QObjectDeletionNotification, since it
has no relation to declarative UI. It's just notification of the
object's deletion. Make the destructor non-inline and place it in
qobject.cpp, so that the virtual table is emitted there and exported
from QtCore.
Also move the QObjectData destructor to qobject.cpp. This means you
cannot create any class deriving directly from QObjectData outside
QtCore, which is the intention anyways (it's a private class and only
QObjectPrivate derives from it).
Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 765b26f..075f9c3 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1375,10 +1375,9 @@ QWidget::~QWidget() // set all QPointers for this object to zero QObjectPrivate::clearGuards(this); - if(d->declarativeData) { - QDeclarativeData *dd = d->declarativeData; - d->declarativeData = 0; - dd->destroyed(this); + if (d->deletionNotification) { + d->deletionNotification->destroyed(this); + d->deletionNotification = 0; // don't activate again in ~QObject } if (!d->children.isEmpty()) |