summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-10-14 10:50:45 +0200
committerUlf Hermann <ulf.hermann@qt.io>2016-10-14 10:41:19 +0000
commitd21bf21aed0c346b5666725ba52c4424c360c028 (patch)
treeeac8037b70a2edd9f7c98fb54d4f8fad951f7ff1 /tests
parent46befdc26215c232047673e895245054f6a3079e (diff)
Use std::function for onEntry and onExit return types
This allows us to drop the C++14 requirement. As onEntry and onExit are template functions we don't need to care about (not) using the standard library for them. Change-Id: Ie776e04f7e1771914c9f48d2440ef445d87d64c0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/compiled/compiled.pro2
-rw-r--r--tests/auto/compiled/tst_compiled.cpp3
-rw-r--r--tests/auto/statemachine/statemachine.pro2
-rw-r--r--tests/auto/statemachine/tst_statemachine.cpp3
4 files changed, 2 insertions, 8 deletions
diff --git a/tests/auto/compiled/compiled.pro b/tests/auto/compiled/compiled.pro
index c13cbf4..713f484 100644
--- a/tests/auto/compiled/compiled.pro
+++ b/tests/auto/compiled/compiled.pro
@@ -1,5 +1,5 @@
QT = core gui qml testlib scxml
-CONFIG += testcase c++14
+CONFIG += testcase
TARGET = tst_compiled
CONFIG += console
diff --git a/tests/auto/compiled/tst_compiled.cpp b/tests/auto/compiled/tst_compiled.cpp
index 27e4a80..6ee181d 100644
--- a/tests/auto/compiled/tst_compiled.cpp
+++ b/tests/auto/compiled/tst_compiled.cpp
@@ -168,15 +168,12 @@ void tst_Compiled::connection()
QMetaObject::Connection conB = stateMachine.connectToState("b", &receiverB, SLOT(receive(bool)));
QMetaObject::Connection conFinal = stateMachine.connectToState("final", &receiverFinal, SLOT(receive(bool)));
-#if defined(__cpp_return_type_deduction) && __cpp_return_type_deduction == 201304
- // C++14 available: test for onEntry and onExit
typedef QScxmlStateMachine QXSM;
QMetaObject::Connection aEntry = stateMachine.connectToState("a", QXSM::onEntry(&receiverA, "enter"));
QMetaObject::Connection aExit = stateMachine.connectToState("a", QXSM::onExit(&receiverA, "exit"));
QVERIFY(aEntry);
QVERIFY(aExit);
-#endif
QVERIFY(conA);
QVERIFY(conA1);
diff --git a/tests/auto/statemachine/statemachine.pro b/tests/auto/statemachine/statemachine.pro
index 95bf9a8..0e4de1a 100644
--- a/tests/auto/statemachine/statemachine.pro
+++ b/tests/auto/statemachine/statemachine.pro
@@ -1,5 +1,5 @@
QT = core gui qml testlib scxml-private
-CONFIG += testcase c++14
+CONFIG += testcase
TARGET = tst_statemachine
CONFIG += console
diff --git a/tests/auto/statemachine/tst_statemachine.cpp b/tests/auto/statemachine/tst_statemachine.cpp
index 1cf0518..9c757e7 100644
--- a/tests/auto/statemachine/tst_statemachine.cpp
+++ b/tests/auto/statemachine/tst_statemachine.cpp
@@ -183,8 +183,6 @@ void tst_StateMachine::connections()
});
QVERIFY(final);
-#if defined(__cpp_return_type_deduction) && __cpp_return_type_deduction == 201304
- // C++14 available, test onEntry and onExit
bool a1Entered = false;
bool a1Exited = false;
bool finalEntered = false;
@@ -219,7 +217,6 @@ void tst_StateMachine::connections()
finalExited = true;
}));
QVERIFY(finalExit);
-#endif
stateMachine->start();