Bluetooth issue on Mac

Dirk Hohndel dirk at hohndel.org
Sun Sep 27 12:01:40 PDT 2015


When trying to download from a BT dive computer on Mac (I tried this with
an OSTC Sport and with a Shearwater Petrel 2) I get this strange error
message:

QObject::connect: Cannot queue arguments of type 'QBluetoothServiceInfo'
(Make sure 'QBluetoothServiceInfo' is registered using qRegisterMetaType().)
Failed to connect to device  00:12:6F:2A:0E:E0 . Device state QBluetoothSocket::UnconnectedState . Error: QBluetoothSocket::ServiceNotFoundError
(with different BT addresses of course)

Now when I add an attempt to register the type (i.e., adding
Q_DECLARE_METATYPE(QBluetoothServiceInfo) in qtserialbluetooth.c) then the
compile fails with

/Users/dhohndel/src/subsurface-build/subsurface/qtserialbluetooth.cpp:18:1:
error: redefinition of 'QMetaTypeId<QBluetoothServiceInfo>'
Q_DECLARE_METATYPE(QBluetoothServiceInfo)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dhohndel/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qmetatype.h:1840:34:
note: expanded from macro 'Q_DECLARE_METATYPE'
#define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/dhohndel/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qmetatype.h:1844:12:
note: expanded from macro 'Q_DECLARE_METATYPE_IMPL'
    struct QMetaTypeId< TYPE >                                          \
           ^~~~~~~~~~~~~~~~~~~
/Users/dhohndel/Qt/5.5/clang_64/lib/QtBluetooth.framework/Headers/qbluetoothserviceinfo.h:153:1:
note: previous definition is here
Q_DECLARE_METATYPE(QBluetoothServiceInfo)
^
/Users/dhohndel/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qmetatype.h:1840:34:
note: expanded from macro 'Q_DECLARE_METATYPE'
#define Q_DECLARE_METATYPE(TYPE) Q_DECLARE_METATYPE_IMPL(TYPE)
                                 ^
/Users/dhohndel/Qt/5.5/clang_64/lib/QtCore.framework/Headers/qmetatype.h:1844:12:
note: expanded from macro 'Q_DECLARE_METATYPE_IMPL'
    struct QMetaTypeId< TYPE >                                          \
           ^

So it doesn't work if I don't declare the type, but it doesn't work either
if I DO declare the type.

Any ideas?

/D



More information about the subsurface mailing list