diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2019-06-28 11:40:58 +0200 |
---|---|---|
committer | Andre Hartmann <aha_1980@gmx.de> | 2019-07-03 10:44:52 +0200 |
commit | 533027e8bbc17bf39f74ef99edeb395c25d80ab4 (patch) | |
tree | 2a0afc769d0e46340adff2c2825142159875aa11 /src/serialbus/qmodbusrtuserialslave_p.h | |
parent | 70ab1b4e55f95011804371d3e04764ed87eed208 (diff) |
Modbus: Use QOverload instead home-brewed casting
Change-Id: I44fa85864552143f82b34594d13ca3584f316680
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Diffstat (limited to 'src/serialbus/qmodbusrtuserialslave_p.h')
-rw-r--r-- | src/serialbus/qmodbusrtuserialslave_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serialbus/qmodbusrtuserialslave_p.h b/src/serialbus/qmodbusrtuserialslave_p.h index f613077..b25a039 100644 --- a/src/serialbus/qmodbusrtuserialslave_p.h +++ b/src/serialbus/qmodbusrtuserialslave_p.h @@ -280,8 +280,8 @@ public: storeModbusCommEvent(event); // store the final event after processing }); - using TypeId = void (QSerialPort::*)(QSerialPort::SerialPortError); - QObject::connect(m_serialPort, static_cast<TypeId>(&QSerialPort::error), q, + QObject::connect(m_serialPort, + QOverload<QSerialPort::SerialPortError>::of(&QSerialPort::error), q, [this](QSerialPort::SerialPortError error) { if (error == QSerialPort::NoError) return; |