From 0be7ab1af2647f4006f8aa52562650490c7b56fb Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Tue, 10 Dec 2013 20:18:39 +0200 Subject: [PATCH] Fix tests compilation Change-Id: If8c5f6ca040cdcdee883b91e1909acbd5dfc4922 Reviewed-by: Fawzi Mohamed Reviewed-by: Eike Ziller --- tests/manual/debugger/simple/simple_test_app.cpp | 13 +++++++++++++ tests/tools/qml-ast2dot/main.cpp | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index ddadcea05c0..059cf9cc1e7 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -116,6 +116,12 @@ #define USE_SHARED_POINTER 0 #endif +#if QT_VERSION >= 0x050200 +#define USE_TIMEZONE 1 +#else +#define USE_TIMEZONE 0 +#endif + void dummyStatement(...) {} #if USE_CXX11 && defined(__GNUC__) && defined(__STRICT_ANSI__) @@ -146,6 +152,10 @@ void dummyStatement(...) {} #include #endif +#if USE_TIMEZONE +#include +#endif + #if USE_GUILIB #include #include // QWidgets: Separate module as of Qt 5 @@ -5475,6 +5485,7 @@ namespace basic { void testLongEvaluation1() { +#if USE_TIMEZONE QTimeZone tz("UTC+05:00"); QDateTime time = QDateTime::currentDateTime(); const int N = 10000; @@ -5495,6 +5506,7 @@ namespace basic { // Continue. // Note: This is expected to _not_ take up to a minute. dummyStatement(&bigv); +#endif } void testLongEvaluation2() @@ -7039,6 +7051,7 @@ template int ffff(X x) int main(int argc, char *argv[]) { int z = ffff(3) + ffff(2.0); + Q_UNUSED(z); #if USE_GUILIB QApplication app(argc, argv); diff --git a/tests/tools/qml-ast2dot/main.cpp b/tests/tools/qml-ast2dot/main.cpp index f268e90246f..4ffe4c29cb1 100644 --- a/tests/tools/qml-ast2dot/main.cpp +++ b/tests/tools/qml-ast2dot/main.cpp @@ -253,7 +253,7 @@ protected: // visiting functions: virtual bool visit(ObjectLiteral *ast) { terminal(ast->lbraceToken); nonterminal(ast->properties); terminal(ast->rbraceToken); return false; } virtual bool visit(ElementList *ast) { nonterminal(ast->next); terminal(ast->commaToken); nonterminal(ast->elision); nonterminal(ast->expression); return false; } virtual bool visit(Elision *ast) { nonterminal(ast->next); terminal(ast->commaToken); return false; } - virtual bool visit(PropertyNameAndValueList *ast) { nonterminal(ast->name); terminal(ast->colonToken); nonterminal(ast->value); terminal(ast->commaToken); nonterminal(ast->next); return false; } + virtual bool visit(PropertyAssignmentList *ast) { nonterminal(ast->assignment); nonterminal(ast->next); terminal(ast->commaToken); return false; } virtual bool visit(IdentifierPropertyName *ast) { terminal(ast->propertyNameToken); return false; } virtual bool visit(StringLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; } virtual bool visit(NumericLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }