From 5307798688898b73e953276bbac36be5549728d7 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 8 Nov 2010 09:57:55 +0100 Subject: Revert "QPointer: assert when using QPointer on destroyed QObject" This reverts commit 96e873d4ed59bd9feef1c5dacc28f77377e53c47. Many tests where failing. (including the QWidget autotest) --- src/corelib/kernel/qobject.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp index 12a09fd..7fe9c52 100644 --- a/src/corelib/kernel/qobject.cpp +++ b/src/corelib/kernel/qobject.cpp @@ -392,7 +392,6 @@ void QMetaObject::addGuard(QObject **ptr) return; } QMutexLocker locker(guardHashLock()); - Q_ASSERT_X(!QObjectPrivate::get(*ptr)->wasDeleted, "QPointer", "Detected QPointer creation on a QObject being deleted"); QObjectPrivate::get(*ptr)->hasGuards = true; hash->insert(*ptr, ptr); } @@ -435,7 +434,6 @@ void QMetaObject::changeGuard(QObject **ptr, QObject *o) } QMutexLocker locker(guardHashLock()); if (o) { - Q_ASSERT_X(!QObjectPrivate::get(o)->wasDeleted, "QPointer", "Detected QPointer creation on a QObject being deleted"); hash->insert(o, ptr); QObjectPrivate::get(o)->hasGuards = true; } -- cgit v0.12