diff --git a/tests/operation/test_operation.cpp b/tests/operation/test_operation.cpp index f88004a..00ecb9a 100644 --- a/tests/operation/test_operation.cpp +++ b/tests/operation/test_operation.cpp @@ -30,10 +30,11 @@ class OperationTests: public QObject { Q_OBJECT +#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) + private slots: void initTestCase(); void cleanup(); - void connectAndDisconnect(); void keepAliveTimesOut(); @@ -91,8 +92,11 @@ private: MqttServer *m_server = nullptr; QList m_clients; +#endif }; +#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) + MqttClient *OperationTests::connectAndWait(const QString &clientId, bool cleanSession, quint16 keepAlive, const QString &willTopic, const QString &willMessage, Mqtt::QoS willQoS, bool willRetain) { QPair result = connectToServer(clientId, cleanSession, keepAlive, willTopic, willMessage, willQoS, willRetain); @@ -809,6 +813,7 @@ void OperationTests::testEmptyClientId() QTRY_COMPARE(client3.second->first().at(0).value(), Mqtt::ConnectReturnCodeIdentifierRejected); } +#endif QTEST_MAIN(OperationTests) #include "test_operation.moc"