From c231e60cd3aa982b10512c5c23bbca04223ed407 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Fri, 20 Sep 2013 15:29:39 +0200 Subject: Error handling for QBluetoothServer Task-number: QTBUG-32669 Change-Id: I0f12b19f7989972b7c8305f6e11a95f7f25a281d Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothserver_p.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bluetooth/qbluetoothserver_p.cpp') diff --git a/src/bluetooth/qbluetoothserver_p.cpp b/src/bluetooth/qbluetoothserver_p.cpp index 1a123c4d..213d73f1 100644 --- a/src/bluetooth/qbluetoothserver_p.cpp +++ b/src/bluetooth/qbluetoothserver_p.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE QBluetoothServerPrivate::QBluetoothServerPrivate(QBluetoothServiceInfo::Protocol sType) - : serverType(sType) + : serverType(sType), m_lastError(QBluetoothServer::NoError) { } @@ -62,6 +62,9 @@ bool QBluetoothServer::listen(const QBluetoothAddress &address, quint16 port) { Q_UNUSED(address); Q_UNUSED(port); + Q_D(QBluetoothServer); + d->m_lastError = UnsupportedProtocolError; + emit error(d->m_lastError); return false; } -- cgit v1.2.3