forked from qt-creator/qt-creator
Fix tests compilation
Change-Id: If8c5f6ca040cdcdee883b91e1909acbd5dfc4922 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Eike Ziller
parent
6f6e09211c
commit
0be7ab1af2
@@ -116,6 +116,12 @@
|
|||||||
#define USE_SHARED_POINTER 0
|
#define USE_SHARED_POINTER 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QT_VERSION >= 0x050200
|
||||||
|
#define USE_TIMEZONE 1
|
||||||
|
#else
|
||||||
|
#define USE_TIMEZONE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
void dummyStatement(...) {}
|
void dummyStatement(...) {}
|
||||||
|
|
||||||
#if USE_CXX11 && defined(__GNUC__) && defined(__STRICT_ANSI__)
|
#if USE_CXX11 && defined(__GNUC__) && defined(__STRICT_ANSI__)
|
||||||
@@ -146,6 +152,10 @@ void dummyStatement(...) {}
|
|||||||
#include <QSharedPointer>
|
#include <QSharedPointer>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if USE_TIMEZONE
|
||||||
|
#include <QTimeZone>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_GUILIB
|
#if USE_GUILIB
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QApplication> // QWidgets: Separate module as of Qt 5
|
#include <QApplication> // QWidgets: Separate module as of Qt 5
|
||||||
@@ -5475,6 +5485,7 @@ namespace basic {
|
|||||||
|
|
||||||
void testLongEvaluation1()
|
void testLongEvaluation1()
|
||||||
{
|
{
|
||||||
|
#if USE_TIMEZONE
|
||||||
QTimeZone tz("UTC+05:00");
|
QTimeZone tz("UTC+05:00");
|
||||||
QDateTime time = QDateTime::currentDateTime();
|
QDateTime time = QDateTime::currentDateTime();
|
||||||
const int N = 10000;
|
const int N = 10000;
|
||||||
@@ -5495,6 +5506,7 @@ namespace basic {
|
|||||||
// Continue.
|
// Continue.
|
||||||
// Note: This is expected to _not_ take up to a minute.
|
// Note: This is expected to _not_ take up to a minute.
|
||||||
dummyStatement(&bigv);
|
dummyStatement(&bigv);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void testLongEvaluation2()
|
void testLongEvaluation2()
|
||||||
@@ -7039,6 +7051,7 @@ template <class X> int ffff(X x)
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int z = ffff(3) + ffff(2.0);
|
int z = ffff(3) + ffff(2.0);
|
||||||
|
Q_UNUSED(z);
|
||||||
|
|
||||||
#if USE_GUILIB
|
#if USE_GUILIB
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
|
@@ -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(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(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(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(IdentifierPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
|
||||||
virtual bool visit(StringLiteralPropertyName *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; }
|
virtual bool visit(NumericLiteralPropertyName *ast) { terminal(ast->propertyNameToken); return false; }
|
||||||
|
Reference in New Issue
Block a user