From 3b21fb04408e08fd58d7f619c45dc087dba5d9e5 Mon Sep 17 00:00:00 2001 From: Denis Shienkov Date: Wed, 30 Dec 2015 18:09:22 +0300 Subject: Keep a fractional part of custom baud rate in a debug output Change-Id: I1f7b5436a00dec545f6256d15147abd43f92767b Reviewed-by: Sergey Belyashov Reviewed-by: Denis Shienkov --- src/serialport/qserialport_unix.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/serialport/qserialport_unix.cpp b/src/serialport/qserialport_unix.cpp index 7eb43a1..960349e 100644 --- a/src/serialport/qserialport_unix.cpp +++ b/src/serialport/qserialport_unix.cpp @@ -524,10 +524,10 @@ bool QSerialPortPrivate::setCustomBaudRate(qint32 baudRate, QSerialPort::Directi } if (serial.custom_divisor * baudRate != serial.baud_base) { - qWarning("Baud rate of serial port %s is set to %d instead of %d: divisor %f unsupported", + qWarning("Baud rate of serial port %s is set to %f instead of %d: divisor %f unsupported", qPrintable(systemLocation), - serial.baud_base / serial.custom_divisor, - baudRate, (float)serial.baud_base / baudRate); + float(serial.baud_base) / serial.custom_divisor, + baudRate, float(serial.baud_base) / baudRate); } if (::ioctl(descriptor, TIOCSSERIAL, &serial) == -1) { -- cgit v1.2.1