diff options
-rw-r--r-- | dist/changes-5.6.1 | 37 | ||||
-rw-r--r-- | dist/changes-5.6.2 | 36 | ||||
-rw-r--r-- | src/plugins/canbus/peakcan/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/canbus/peakcan/peakcanbackend.cpp | 8 | ||||
-rw-r--r-- | src/plugins/canbus/socketcan/socketcanbackend.cpp | 3 | ||||
-rw-r--r-- | src/plugins/canbus/tinycan/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/canbus/tinycan/tinycanbackend.cpp | 2 | ||||
-rw-r--r-- | src/serialbus/doc/qtserialbus.qdocconf | 1 | ||||
-rw-r--r-- | src/serialbus/qcanbusdevice.h | 3 |
9 files changed, 84 insertions, 10 deletions
diff --git a/dist/changes-5.6.1 b/dist/changes-5.6.1 new file mode 100644 index 0000000..b37bfcc --- /dev/null +++ b/dist/changes-5.6.1 @@ -0,0 +1,37 @@ +Qt 5.6.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.6.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://doc.qt.io/qt-5/index.html + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtSerialBus +--------- + + - Build system improvements + - Documentation improvements + - Several fixes to CAN-Examples + - Several Qt coding style related fixes + + - QTBUG-52953: Doc: Remove repository name from examplesinstallpath + - QTBUG-53171: CAN-Example: Fix not receiving empty CAN frames + - QTBUG-51932: Make socketcan backend compile on pre 3.6 kernels + - QTBUG-51655: Make C++11 test less restrictive + - QTBUG-51745: Fix 'multiple definition' with static build (Windows) + - QTBUG-51655: Update .pro file and config tests with stricter C++11 requirements diff --git a/dist/changes-5.6.2 b/dist/changes-5.6.2 new file mode 100644 index 0000000..2a4ce27 --- /dev/null +++ b/dist/changes-5.6.2 @@ -0,0 +1,36 @@ +Qt 5.6.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.6.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://doc.qt.io/qt-5/index.html + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +QtSerialBus +--------- + + - Build system improvements + - Documentation improvements + - Several fixes to CAN-Examples + - Several PeakCAN and SocketCAN implementation improvements + - Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" + + - QTBUG-53171: CAN: Fix displaying extended identifiers below 0x800 + - QTBUG-53171: CAN: Fix displaying data bytes for remote request frames + - QTBUG-53767: Fix Modbus timeout on Windows. + - QTBUG-53277: Make adueditor compile on platforms with QT_NO_CLIPBOARD diff --git a/src/plugins/canbus/peakcan/main.cpp b/src/plugins/canbus/peakcan/main.cpp index 6606cc2..d4886a9 100644 --- a/src/plugins/canbus/peakcan/main.cpp +++ b/src/plugins/canbus/peakcan/main.cpp @@ -55,7 +55,7 @@ public: { QString errorReason; if (!PeakCanBackend::canCreate(&errorReason)) { - qWarning("%s", qPrintable(errorReason)); + qWarning("%s", qUtf8Printable(errorReason)); if (errorMessage) *errorMessage = errorReason; return nullptr; diff --git a/src/plugins/canbus/peakcan/peakcanbackend.cpp b/src/plugins/canbus/peakcan/peakcanbackend.cpp index 7742622..09d4e34 100644 --- a/src/plugins/canbus/peakcan/peakcanbackend.cpp +++ b/src/plugins/canbus/peakcan/peakcanbackend.cpp @@ -65,7 +65,7 @@ bool PeakCanBackend::canCreate(QString *errorReason) #else static bool symbolsResolved = resolveSymbols(pcanLibrary()); if (!symbolsResolved) { - *errorReason = tr("The PCAN runtime library is not found"); + *errorReason = pcanLibrary()->errorString(); return false; } return true; @@ -393,13 +393,15 @@ void PeakCanBackendPrivate::startRead() const TPCANStatus st = ::CAN_Read(channelIndex, &message, ×tamp); if (st != PCAN_ERROR_OK) { - if (st != PCAN_ERROR_XMTFULL) + if (st != PCAN_ERROR_QRCVEMPTY) q->setError(systemErrorString(st), QCanBusDevice::ReadError); break; } QCanBusFrame frame(message.ID, QByteArray(reinterpret_cast<const char *>(message.DATA), int(message.LEN))); - frame.setTimeStamp(QCanBusFrame::TimeStamp(timestamp.millis / 1000, timestamp.micros)); + const quint64 millis = timestamp.millis + Q_UINT64_C(0xFFFFFFFF) * timestamp.millis_overflow; + const quint64 micros = Q_UINT64_C(1000) * (millis % 1000) + timestamp.micros; + frame.setTimeStamp(QCanBusFrame::TimeStamp(millis / 1000, micros)); frame.setExtendedFrameFormat(message.MSGTYPE & PCAN_MESSAGE_EXTENDED); frame.setFrameType((message.MSGTYPE & PCAN_MESSAGE_RTR) ? QCanBusFrame::RemoteRequestFrame : QCanBusFrame::DataFrame); diff --git a/src/plugins/canbus/socketcan/socketcanbackend.cpp b/src/plugins/canbus/socketcan/socketcanbackend.cpp index 8c3d9ee..c9781d1 100644 --- a/src/plugins/canbus/socketcan/socketcanbackend.cpp +++ b/src/plugins/canbus/socketcan/socketcanbackend.cpp @@ -35,7 +35,6 @@ ****************************************************************************/ #include "socketcanbackend.h" -#include <QtSerialBus/qcanbusdevice.h> #include <QtCore/qdebug.h> #include <QtCore/qdatastream.h> @@ -266,7 +265,7 @@ bool SocketCanBackend::connectSocket() return false; } - strcpy(interface.ifr_name, canSocketName.toLatin1().data()); + qstrncpy(interface.ifr_name, canSocketName.toLatin1().constData(), sizeof(interface.ifr_name)); if (ioctl(canSocket, SIOCGIFINDEX, &interface) < 0) { setError(qt_error_string(errno), QCanBusDevice::CanBusError::ConnectionError); diff --git a/src/plugins/canbus/tinycan/main.cpp b/src/plugins/canbus/tinycan/main.cpp index 65a4784..5bce912 100644 --- a/src/plugins/canbus/tinycan/main.cpp +++ b/src/plugins/canbus/tinycan/main.cpp @@ -55,7 +55,7 @@ public: { QString errorReason; if (!TinyCanBackend::canCreate(&errorReason)) { - qWarning("%s", qPrintable(errorReason)); + qWarning("%s", qUtf8Printable(errorReason)); if (errorMessage) *errorMessage = errorReason; return nullptr; diff --git a/src/plugins/canbus/tinycan/tinycanbackend.cpp b/src/plugins/canbus/tinycan/tinycanbackend.cpp index 3f7f0fc..0961813 100644 --- a/src/plugins/canbus/tinycan/tinycanbackend.cpp +++ b/src/plugins/canbus/tinycan/tinycanbackend.cpp @@ -61,7 +61,7 @@ bool TinyCanBackend::canCreate(QString *errorReason) #else static bool symbolsResolved = resolveSymbols(mhstcanLibrary()); if (!symbolsResolved) { - *errorReason = tr("The MHSTCAN runtime library is not found"); + *errorReason = mhstcanLibrary()->errorString(); return false; } return true; diff --git a/src/serialbus/doc/qtserialbus.qdocconf b/src/serialbus/doc/qtserialbus.qdocconf index c84064c..d80d953 100644 --- a/src/serialbus/doc/qtserialbus.qdocconf +++ b/src/serialbus/doc/qtserialbus.qdocconf @@ -43,3 +43,4 @@ imagedirs += images navigation.landingpage = "Qt Serial Bus" navigation.cppclassespage = "Qt Serial Bus C++ Classes" +navigation.homepage = "Qt Documentation (Technology Preview)" diff --git a/src/serialbus/qcanbusdevice.h b/src/serialbus/qcanbusdevice.h index 973619b..6a015af 100644 --- a/src/serialbus/qcanbusdevice.h +++ b/src/serialbus/qcanbusdevice.h @@ -97,8 +97,7 @@ public: explicit QCanBusDevice(QObject *parent = nullptr); - virtual void setConfigurationParameter(int key, - const QVariant &value); + virtual void setConfigurationParameter(int key, const QVariant &value); QVariant configurationParameter(int key) const; QVector<int> configurationKeys() const; |