aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2013-12-10 20:18:39 +0200
committerEike Ziller <eike.ziller@digia.com>2013-12-12 10:36:56 +0100
commit0be7ab1af2647f4006f8aa52562650490c7b56fb (patch)
treeb39fe0a4f0388fa20bc490901cbb98b22e166b1e /tests
parent6f6e09211c23ec299607c527c0990f4fb1c31165 (diff)
Fix tests compilation
Change-Id: If8c5f6ca040cdcdee883b91e1909acbd5dfc4922 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/manual/debugger/simple/simple_test_app.cpp13
-rw-r--r--tests/tools/qml-ast2dot/main.cpp2
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp
index ddadcea05c..059cf9cc1e 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 <QSharedPointer>
#endif
+#if USE_TIMEZONE
+#include <QTimeZone>
+#endif
+
#if USE_GUILIB
#include <QAction>
#include <QApplication> // 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 <class X> 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 f268e90246..4ffe4c29cb 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; }