Commit 71cad949 authored by hjk's avatar hjk
Browse files

debugger: make autotests compilable without private qt headers



Change-Id: Iacb6df6b369e9fd1520ae797934a9bfb9927add4
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 4f891e99
......@@ -11,7 +11,9 @@ MACROSDIR = $$IDE_SOURCE_TREE/share/qtcreator/dumper
SOURCES += \
$$DEBUGGERDIR/gdb/gdbmi.cpp \
$$MACROSDIR/dumper.cpp \
tst_dumpers.cpp \
tst_dumpers.cpp
exists($$QMAKE_INCDIR_QT/QtCore/private/qobject_p.h):DEFINES += USE_PRIVATE
DEFINES += MACROSDEBUG
......
......@@ -40,7 +40,11 @@
#include "json.h"
#ifdef USE_PRIVATE
#include <QtCore/private/qobject_p.h>
#else
#warning "No private headers for this Qt version available"
#endif
#include <QtGui/QStandardItemModel>
#include <QtGui/QStringListModel>
......@@ -207,6 +211,7 @@ private slots:
void dumpQLocale();
void dumpQMap();
void dumpQMapNode();
#ifdef USE_PRIVATE
void dumpQObject();
void dumpQObjectChildList();
void dumpQObjectMethodList();
......@@ -215,6 +220,7 @@ private slots:
void dumpQObjectSignalList();
void dumpQObjectSlot();
void dumpQObjectSlotList();
#endif
void dumpQPixmap();
void dumpQSharedPointer();
void dumpQString();
......@@ -1726,6 +1732,7 @@ void tst_Dumpers::dumpQMapNode()
dumpQMapNodeHelper(map4);
}
#ifdef USE_PRIVATE
void tst_Dumpers::dumpQObject()
{
QObject parent;
......@@ -2190,6 +2197,7 @@ void tst_Dumpers::dumpQObjectSlotList()
"addr='$A',type='" NS "QObjectSlot'}]",
&m, NS"QObjectSlotList", true);
}
#endif
void tst_Dumpers::dumpQPixmap()
{
......@@ -2468,6 +2476,7 @@ void tst_Dumpers::initTestCase()
QVERIFY(sizeof(int) == sizeof(d.weakref));
QVERIFY(sizeof(int) == sizeof(d.strongref));
#endif
#ifdef USE_PRIVATE
const size_t qObjectPrivateSize = sizeof(QObjectPrivate);
const size_t objectPrivateSize = sizeof(ObjectPrivate);
QVERIFY2(qObjectPrivateSize == objectPrivateSize, QString::fromLatin1("QObjectPrivate=%1 ObjectPrivate=%2").arg(qObjectPrivateSize).arg(objectPrivateSize).toLatin1().constData());
......@@ -2489,6 +2498,7 @@ void tst_Dumpers::initTestCase()
#if QT_VERSION >= 0x040600
VERIFY_OFFSETOF(sharedRefcount);
#endif
#endif
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment