From da396bc54b776da682ffdcd2aa61f504d607bc12 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Sat, 18 Apr 2015 20:52:27 +0300 Subject: Remove the QT_VERSION_CHECK(5, 0, 0) macro ... since current branch supports only Qt5. Change-Id: I2aaf4261b307eb6ca7ae32e94ddaf7801395f022 Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- src/serialport/qtudev_p.h | 6 ------ tests/auto/qserialport/tst_qserialport.cpp | 21 --------------------- tests/auto/qserialportinfo/tst_qserialportinfo.cpp | 4 ---- tests/manual/qserialport/tst_qserialport.cpp | 4 ---- 4 files changed, 35 deletions(-) diff --git a/src/serialport/qtudev_p.h b/src/serialport/qtudev_p.h index f2eedd38..6f2cabd7 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 627de6c5..1a714b2f 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 54f18253..f0e6e9a7 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 380af390..f6f3252e 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 } } -- cgit v1.2.3