BT on Mac

Thiago Macieira thiago at macieira.org
Mon Sep 26 15:01:26 PDT 2016


On domingo, 25 de setembro de 2016 12:47:23 PDT Dirk Hohndel wrote:
> So we now have a few reports that this isn’t working anymore…
> I can reproduce things here but have no clue how to fix it.
> 
> First I get this error
> 
> QObject::connect: Cannot queue arguments of type 'QBluetoothServiceInfo'
> (Make sure 'QBluetoothServiceInfo' is registered using qRegisterMetaType().)

I remember seeing this elsewhere. It might be a Qt bug.

> which appears to be caused by this code in qtserialbluetooth:
> 
> #elif defined(Q_OS_ANDROID) || (QT_VERSION >= 0x050500 && defined(Q_OS_MAC))
> // Try to connect to the device using the uuid of the Serial Port Profile
> service QBluetoothAddress remoteDeviceAddress(devaddr);
> 	serial_port->socket->connectToService(remoteDeviceAddress,
> QBluetoothUuid(QBluetoothUuid::SerialPort)); 
> 	timer.start(msec);
> 	loop.exec();

There's no QBluetoothServiceInfo in there. The only reference in the source 
code is

     serial_port->socket = new 
QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);

I don't remember the Bluetooth code implementation anymore (even though I 
mentored the student who wrote it). Is the code in qtserialbluetooth.cpp 
running in an auxiliary thread, started by libdc?

I've attached a blind attempt at fixing this. I have no idea if it helps in any 
way. It may make things even worse.

Can you run with QT_FATAL_WARNINGS=1 and then give me the backtrace of that 
QObject::connect warning? (this requires that Qt print no other warnings 
before this one) My guess is that this is the emission of the 
QBluetoothServiceDiscoveryAgent::serviceDiscovered signal starting at 
QBluetoothServiceDiscoveryAgentPrivate::performMinimalServiceDiscovery.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Register-the-QtBluetooth-metatypes-for-Qt.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160926/52314e83/attachment.bin>


More information about the subsurface mailing list