diff options
-rw-r--r-- | src/serialport/qtudev_p.h | 6 | ||||
-rw-r--r-- | tests/auto/qserialport/tst_qserialport.cpp | 21 | ||||
-rw-r--r-- | tests/auto/qserialportinfo/tst_qserialportinfo.cpp | 4 | ||||
-rw-r--r-- | tests/manual/qserialport/tst_qserialport.cpp | 4 |
4 files changed, 0 insertions, 35 deletions
diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h index f2eedd3..6f2cabd 100644 --- a/src/serialport/qtudev_p.h +++ b/src/serialport/qtudev_p.h @@ -93,15 +93,9 @@ GENERATE_SYMBOL_VARIABLE(void, udev_device_unref, struct udev_device *) GENERATE_SYMBOL_VARIABLE(void, udev_enumerate_unref, struct udev_enumerate *) GENERATE_SYMBOL_VARIABLE(void, udev_unref, struct udev *) -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) inline QFunctionPointer resolveSymbol(QLibrary *udevLibrary, const char *symbolName) { QFunctionPointer symbolFunctionPointer = udevLibrary->resolve(symbolName); -#else -inline void *resolveSymbol(QLibrary *udevLibrary, const char *symbolName) -{ - void *symbolFunctionPointer = udevLibrary->resolve(symbolName); -#endif if (!symbolFunctionPointer) qWarning("Failed to resolve the udev symbol: %s", symbolName); diff --git a/tests/auto/qserialport/tst_qserialport.cpp b/tests/auto/qserialport/tst_qserialport.cpp index 627de6c..1a714b2 100644 --- a/tests/auto/qserialport/tst_qserialport.cpp +++ b/tests/auto/qserialport/tst_qserialport.cpp @@ -56,12 +56,7 @@ public: static void enterLoopMsecs(int msecs) { ++loopLevel; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QTestEventLoop::instance().enterLoopMSecs(msecs); -#else - Q_UNUSED(msecs); - QTestEventLoop::instance().enterLoop(1); -#endif --loopLevel; } @@ -176,11 +171,7 @@ void tst_QSerialPort::initTestCase() "\n"; #endif -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP(message); -#else - QSKIP(message, SkipAll); -#endif } else { m_availablePortNames << m_senderPortName << m_receiverPortName; } @@ -243,11 +234,7 @@ void tst_QSerialPort::constructByInfo() static const char message[] = "Test doesn't work because the specified serial ports aren't" " found in system and can't be constructed by QSerialPortInfo.\n"; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP(message); -#else - QSKIP(message, SkipAll); -#endif } #endif @@ -334,11 +321,7 @@ void tst_QSerialPort::handleBytesWrittenAndExitLoopSlot(qint64 bytesWritten) void tst_QSerialPort::flush() { #ifdef Q_OS_WIN -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP("flush() does not work on Windows"); -#else - QSKIP("flush() does not work on Windows", SkipAll); -#endif #endif QSerialPort serialPort(m_senderPortName); @@ -369,11 +352,7 @@ void tst_QSerialPort::handleBytesWrittenAndExitLoopSlot2(qint64 bytesWritten) void tst_QSerialPort::doubleFlush() { #ifdef Q_OS_WIN -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP("flush() does not work on Windows"); -#else - QSKIP("flush() does not work on Windows", SkipAll); -#endif #endif QSerialPort serialPort(m_senderPortName); diff --git a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp index 54f1825..f0e6e9a 100644 --- a/tests/auto/qserialportinfo/tst_qserialportinfo.cpp +++ b/tests/auto/qserialportinfo/tst_qserialportinfo.cpp @@ -75,11 +75,7 @@ void tst_QSerialPortInfo::initTestCase() #else "\n"; #endif -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP(message); -#else - QSKIP(message, SkipAll); -#endif } else { m_availablePortNames << m_senderPortName << m_receiverPortName; } diff --git a/tests/manual/qserialport/tst_qserialport.cpp b/tests/manual/qserialport/tst_qserialport.cpp index 380af39..f6f3252 100644 --- a/tests/manual/qserialport/tst_qserialport.cpp +++ b/tests/manual/qserialport/tst_qserialport.cpp @@ -61,11 +61,7 @@ void tst_QSerialPort::initTestCase() serialPortInfoList = QSerialPortInfo::availablePorts(); if (serialPortInfoList.isEmpty()) { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) QSKIP("Test doesn't work because the serial ports are not detected."); -#else - QSKIP("Test doesn't work because the serial ports are not detected.", SkipAll); -#endif } } |