summaryrefslogtreecommitdiffstats
path: root/src/plugins/canbus/peakcan
diff options
context:
space:
mode:
authorAndre Hartmann <aha_1980@gmx.de>2021-03-17 18:56:19 +0100
committerAndre Hartmann <aha_1980@gmx.de>2021-03-27 16:31:56 +0100
commit43854c9e1fb90175979b5aa1f536dce26f5dd65e (patch)
tree53d5c5e1d03be4d605c5d80ae2cee350add887ac /src/plugins/canbus/peakcan
parent9ca7c251d679b94af8436463b3c6c1e7e07625b4 (diff)
Introduce QCanBusFrame::FrameId
Use a dedicated type instead of quint32 to mark a CAN bus frame identifier as such. For now it is just an alias to quint32, but can be changed to some other type for Qt 7. [ChangeLog][QCanBusFrame] Introduced a specific type QCanBusFrame::FrameId for the CAN bus frames identifier. The new type is a typedef to quint32 and therefore should be source compatible. Change-Id: Ie26aa69cd48eb9cee4c11a0c8f8ba74efae24b4f Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Diffstat (limited to 'src/plugins/canbus/peakcan')
-rw-r--r--src/plugins/canbus/peakcan/peakcan_symbols_p.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/canbus/peakcan/peakcan_symbols_p.h b/src/plugins/canbus/peakcan/peakcan_symbols_p.h
index 9031592..fe4fcd0 100644
--- a/src/plugins/canbus/peakcan/peakcan_symbols_p.h
+++ b/src/plugins/canbus/peakcan/peakcan_symbols_p.h
@@ -276,11 +276,10 @@
// Type definitions
#ifdef Q_OS_MACOS
#define TPCANLong quint64
-#define TPCANLongToFrameID(a) static_cast<quint32>(a)
#else
#define TPCANLong quint32
-#define TPCANLongToFrameID(a) a
#endif
+#define TPCANLongToFrameID(a) static_cast<QCanBusFrame::FrameId>(a)
#define TPCANHandle quint16 // Represents a PCAN hardware channel handle
#define TPCANStatus TPCANLong // Represents a PCAN status/error code
#define TPCANParameter quint8 // Represents a PCAN parameter to be read or set