[PULL REQUEST] Subsurface branch - QtBluetooth serial implementation

Claudiu Olteanu olteanu.vasilica.claudiu at gmail.com
Mon Jul 6 13:19:58 PDT 2015


Hi Thiago,

> +       bool on = !(mode == QBluetoothLocalDevice::HostPoweredOff);
>
> That's slightly weird :-)


I know that this is weird but there is no HostPoweredOn enum :-). It can be
either
off, connectable, discoverable or discoverable limited inquiry. Therefore I
choose
to use !(mode == QBluetoothLocalDevice::HostPoweredOff)) instead of
(mode == QBluetoothLocalDevice::HostDiscoverable || mode ==
QBluetoothLocalDevice::HostConnectable || ..)



> Hint: QString has a "multiarg" arg that works on QStrings and is slightly
>
faster. If you remember, please use it next time.
>
> Hint: please use the Qt API for the containers. I had to look up to see if
> the
> empty() function was a getter of the emptiness state or whether it emptied
> the
> container.



Thanks for your feedback! I will keep in mind what you said. This is the
first time
I work with Qt framework and obviously I have a lot to learn.

Cheers,
Claudiu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150706/352945aa/attachment.html>


More information about the subsurface mailing list