From e5c38532f5711370e8efcc609e8ff4e5d26d4e46 Mon Sep 17 00:00:00 2001
From: ck <qt-info@nokia.com>
Date: Thu, 6 Aug 2009 17:40:53 +0200
Subject: [PATCH] Debugger: Fixed dumper autotests.

Recent changes to QObject and QSharedPointer broke the dumper
auto tests.
---
 share/qtcreator/gdbmacros/gdbmacros_p.h | 1 +
 tests/auto/debugger/main.cpp            | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/share/qtcreator/gdbmacros/gdbmacros_p.h b/share/qtcreator/gdbmacros/gdbmacros_p.h
index 4f5fd570c2f..c1aebd425ea 100644
--- a/share/qtcreator/gdbmacros/gdbmacros_p.h
+++ b/share/qtcreator/gdbmacros/gdbmacros_p.h
@@ -117,6 +117,7 @@ public:
     void *currentChildBeingDeleted;
     void *declarativeData;
     void *objectGuards;
+    QAtomicPointer<void> sharedRefCount;
     int *deleteWatch;
 #endif
 };
diff --git a/tests/auto/debugger/main.cpp b/tests/auto/debugger/main.cpp
index 25099ee209c..c7aa75897b3 100644
--- a/tests/auto/debugger/main.cpp
+++ b/tests/auto/debugger/main.cpp
@@ -1868,13 +1868,13 @@ void tst_Debugger::dumpQSharedPointerHelper(QSharedPointer<T> &ptr)
     QByteArray expected("value='");
     QString val1 = ptr.isNull() ? "<null>" : valToString(*ptr.data());
     QString val2 = isSimpleType(dummy) ? val1 : "";
-    const QAtomicInt *weakAddr;
-    const QAtomicInt *strongAddr;
+    const int *weakAddr;
+    const int *strongAddr;
     int weakValue;
     int strongValue;
     if (!ptr.isNull()) {
-        weakAddr = &Cheater::getData(ptr)->weakref;
-        strongAddr = &Cheater::getData(ptr)->strongref;
+        weakAddr = reinterpret_cast<const int *>(&Cheater::getData(ptr)->weakref);
+        strongAddr = reinterpret_cast<const int *>(&Cheater::getData(ptr)->strongref);
         weakValue = *weakAddr;
         strongValue = *strongAddr;
     } else {
-- 
GitLab