Commit f44aee5d authored by Robert Loehning's avatar Robert Loehning Committed by hjk
Browse files

Debugger: Make simple test compile with old Qt and MSVC



Change-Id: Ibef0886f059a4807af9ad0e7922b37835da75efb
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent d2160e5b
...@@ -175,7 +175,9 @@ void dummyStatement(...) {} ...@@ -175,7 +175,9 @@ void dummyStatement(...) {}
#include <QStandardItemModel> #include <QStandardItemModel>
#include <QTextCursor> #include <QTextCursor>
#include <QTextDocument> #include <QTextDocument>
#include <QTimeZone> # if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
# include <QTimeZone>
# endif
#endif #endif
#if USE_SCRIPTLIB #if USE_SCRIPTLIB
...@@ -718,10 +720,12 @@ namespace qdatetime { ...@@ -718,10 +720,12 @@ namespace qdatetime {
void testQTimeZone() void testQTimeZone()
{ {
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
QTimeZone zz; QTimeZone zz;
QTimeZone tz("UTC+05:00"); QTimeZone tz("UTC+05:00");
BREAK_HERE; BREAK_HERE;
dummyStatement(&zz, &tz); dummyStatement(&zz, &tz);
#endif
} }
void testQDate() void testQDate()
...@@ -3258,9 +3262,11 @@ namespace stdmap { ...@@ -3258,9 +3262,11 @@ namespace stdmap {
void testStdMultiSetInt() void testStdMultiSetInt()
{ {
#ifndef Q_CC_MSVC
std::multiset<int> set = {1, 1, 2, 3, 3, 3}; std::multiset<int> set = {1, 1, 2, 3, 3, 3};
BREAK_HERE; BREAK_HERE;
dummyStatement(&set); dummyStatement(&set);
#endif
} }
void testStdMap() void testStdMap()
...@@ -5522,11 +5528,13 @@ namespace basic { ...@@ -5522,11 +5528,13 @@ namespace basic {
void testLongEvaluation1() void testLongEvaluation1()
{ {
QTimeZone tz("UTC+05:00");
QDateTime time = QDateTime::currentDateTime(); QDateTime time = QDateTime::currentDateTime();
const int N = 10000; const int N = 10000;
QDateTime x = time; QDateTime x = time;
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
QTimeZone tz("UTC+05:00");
x.setTimeZone(tz); x.setTimeZone(tz);
#endif
QDateTime bigv[N]; QDateTime bigv[N];
for (int i = 0; i < 10000; ++i) { for (int i = 0; i < 10000; ++i) {
bigv[i] = time; bigv[i] = time;
......
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