Commit be8e9df5 authored by hjk's avatar hjk
Browse files

Debugger: Fix new QDateTime offset test on Windows



Change-Id: I12b31a41e55855ae99989e350075871a2dad4ef6
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 4d836596
......@@ -129,6 +129,16 @@ void tst_offsets::offsets_data()
QTest::newRow("QDateTimePrivate::utcOffset")
<< int((char *)&p->utcOffset - (char *)p) << 16 << 16;
#elif QT_VERSION < 0x50200
# ifdef Q_OS_WIN
QTest::newRow("QDateTimePrivate::date")
<< int((char *)&p->date - (char *)p) << 8 << 8;
QTest::newRow("QDateTimePrivate::time")
<< int((char *)&p->time - (char *)p) << 16 << 16;
QTest::newRow("QDateTimePrivate::spec")
<< int((char *)&p->spec - (char *)p) << 20 << 20;
QTest::newRow("QDateTimePrivate::utcOffset")
<< int((char *)&p->utcOffset - (char *)p) << 24 << 24;
# else
QTest::newRow("QDateTimePrivate::date")
<< int((char *)&p->date - (char *)p) << 4 << 8;
QTest::newRow("QDateTimePrivate::time")
......@@ -137,7 +147,20 @@ void tst_offsets::offsets_data()
<< int((char *)&p->spec - (char *)p) << 16 << 20;
QTest::newRow("QDateTimePrivate::utcOffset")
<< int((char *)&p->utcOffset - (char *)p) << 20 << 24;
# endif
#else
# ifdef Q_OS_WIN
QTest::newRow("QDateTimePrivate::m_msecs")
<< int((char *)&p->m_msecs - (char *)p) << 8 << 8;
QTest::newRow("QDateTimePrivate::m_spec")
<< int((char *)&p->m_spec - (char *)p) << 16 << 16;
QTest::newRow("QDateTimePrivate::m_offsetFromUtc")
<< int((char *)&p->m_offsetFromUtc - (char *)p) << 20 << 20;
QTest::newRow("QDateTimePrivate::m_timeZone")
<< int((char *)&p->m_timeZone - (char *)p) << 24 << 24;
QTest::newRow("QDateTimePrivate::m_status")
<< int((char *)&p->m_status - (char *)p) << 28 << 32;
# else
QTest::newRow("QDateTimePrivate::m_msecs")
<< int((char *)&p->m_msecs - (char *)p) << 4 << 8;
QTest::newRow("QDateTimePrivate::m_spec")
......@@ -148,6 +171,7 @@ void tst_offsets::offsets_data()
<< int((char *)&p->m_timeZone - (char *)p) << 20 << 24;
QTest::newRow("QDateTimePrivate::m_status")
<< int((char *)&p->m_status - (char *)p) << 24 << 32;
# 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