summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qsharedpointer.cpp28
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h6
2 files changed, 5 insertions, 29 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index ba62ce1..c9dccd3 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -833,42 +833,24 @@ namespace {
};
}
-Q_GLOBAL_STATIC(KnownPointers, knownPointers)
+//Q_GLOBAL_STATIC(KnownPointers, knownPointers)
QT_BEGIN_NAMESPACE
/*!
\internal
*/
-void QtSharedPointer::internalSafetyCheckAdd(const volatile void *ptr)
+void QtSharedPointer::internalSafetyCheckAdd(const volatile void *)
{
- KnownPointers *const kp = knownPointers();
- if (!kp)
- return; // end-game: the application is being destroyed already
-
- QMutexLocker lock(&kp->mutex);
- void *actual = const_cast<void*>(ptr);
- if (kp->values.contains(actual)) {
- printBacktrace(knownPointers()->values.value(actual));
- qFatal("QSharedPointerData: internal self-check failed: pointer %p was already tracked "
- "by another QSharedPointerData object", actual);
- }
-
- kp->values.insert(actual, saveBacktrace());
+ // functionality is broken
+ // fix requires Qt 4.6
}
/*!
\internal
*/
-void QtSharedPointer::internalSafetyCheckRemove(const volatile void *ptr)
+void QtSharedPointer::internalSafetyCheckRemove(const volatile void *)
{
- KnownPointers *const kp = knownPointers();
- if (!kp)
- return; // end-game: the application is being destroyed already
-
- QMutexLocker lock(&kp->mutex);
- void *actual = const_cast<void*>(ptr);
- kp->values.remove(actual);
}
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 0471a1b..7aaed22 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -140,16 +140,10 @@ namespace QtSharedPointer {
inline void internalConstruct(T *ptr)
{
-#ifdef QT_SHAREDPOINTER_TRACK_POINTERS
- if (ptr) internalSafetyCheckAdd(ptr);
-#endif
value = ptr;
}
inline void internalDestroy()
{
-#ifdef QT_SHAREDPOINTER_TRACK_POINTERS
- if (value) internalSafetyCheckRemove(value);
-#endif
}
#if defined(Q_NO_TEMPLATE_FRIENDS)