diff options
Diffstat (limited to 'src/bluetooth/qbluetoothserver_p.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothserver_p.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothserver_p.cpp b/src/bluetooth/qbluetoothserver_p.cpp index 213d73f1..d9efcf2f 100644 --- a/src/bluetooth/qbluetoothserver_p.cpp +++ b/src/bluetooth/qbluetoothserver_p.cpp @@ -46,12 +46,17 @@ QT_BEGIN_NAMESPACE QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType) - : serverType(sType), m_lastError(QBluetoothServer::NoError) + : maxPendingConnections(1), serverType(sType), m_lastError(QBluetoothServer::NoError) { + if (sType == QBluetoothServiceInfo::RfcommProtocol) + socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol); + else + socket = new QBluetoothSocket(QBluetoothServiceInfo::L2capProtocol); } QBluetoothServerPrivate::~QBluetoothServerPrivate() { + delete socket; } void QBluetoothServer::close() |