diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-27 10:30:08 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-27 10:30:09 +0100 |
commit | 7bfd9ae91ff801ae6b36d3fe7563bcb2781c5e01 (patch) | |
tree | 6bf7b4e8caa9bbb9287088368db1d7a98097ba5a /tests | |
parent | 6f442044a17ae8c2acb201ba8c9eb1a8cb452899 (diff) | |
parent | d21da7829811d129b96ca0eb2a56cb6bdae4f1a7 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
.qmake.conf
Change-Id: Id7c4409314c2ad5daf5bc9860befe096a2384849
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp | 5 | ||||
-rw-r--r-- | tests/bttestui/btlocaldevice.cpp | 90 |
2 files changed, 48 insertions, 47 deletions
diff --git a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp index b175ddd0..8ffc0480 100644 --- a/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp +++ b/tests/auto/qlowenergycontroller/tst_qlowenergycontroller.cpp @@ -1755,7 +1755,8 @@ void tst_QLowEnergyController::tst_writeCharacteristic() QTRY_VERIFY_WITH_TIMEOUT( service->state() == QLowEnergyService::ServiceDiscovered, 30000); - //test service described by http://processors.wiki.ti.com/index.php/SensorTag_User_Guide + // test service described by + // http://processors.wiki.ti.com/index.php/CC2650_SensorTag_User%27s_Guide const QList<QLowEnergyCharacteristic> chars = service->characteristics(); QLowEnergyCharacteristic dataChar; @@ -1929,7 +1930,7 @@ void tst_QLowEnergyController::tst_readWriteDescriptor() service->state() == QLowEnergyService::ServiceDiscovered, 30000); // Temperature service described by - // http://processors.wiki.ti.com/index.php/SensorTag_User_Guide + // http://processors.wiki.ti.com/index.php/CC2650_SensorTag_User%27s_Guide // 1. Find temperature data characteristic const QLowEnergyCharacteristic tempData = service->characteristic( diff --git a/tests/bttestui/btlocaldevice.cpp b/tests/bttestui/btlocaldevice.cpp index 583a8c6b..fb3a0270 100644 --- a/tests/bttestui/btlocaldevice.cpp +++ b/tests/bttestui/btlocaldevice.cpp @@ -49,56 +49,56 @@ BtLocalDevice::BtLocalDevice(QObject *parent) : QObject(parent), securityFlags(QBluetooth::NoSecurity) { localDevice = new QBluetoothLocalDevice(this); - connect(localDevice, SIGNAL(error(QBluetoothLocalDevice::Error)), - this, SIGNAL(error(QBluetoothLocalDevice::Error))); - connect(localDevice, SIGNAL(hostModeStateChanged(QBluetoothLocalDevice::HostMode)), - this, SIGNAL(hostModeStateChanged())); - connect(localDevice, SIGNAL(pairingFinished(QBluetoothAddress,QBluetoothLocalDevice::Pairing)), - this, SLOT(pairingFinished(QBluetoothAddress,QBluetoothLocalDevice::Pairing))); - connect(localDevice, SIGNAL(deviceConnected(QBluetoothAddress)), - this, SLOT(connected(QBluetoothAddress))); - connect(localDevice, SIGNAL(deviceDisconnected(QBluetoothAddress)), - this, SLOT(disconnected(QBluetoothAddress))); - connect(localDevice, SIGNAL(pairingDisplayConfirmation(QBluetoothAddress,QString)), - this, SLOT(pairingDisplayConfirmation(QBluetoothAddress,QString))); + connect(localDevice, &QBluetoothLocalDevice::error, + this, &BtLocalDevice::error); + connect(localDevice, &QBluetoothLocalDevice::hostModeStateChanged, + this, &BtLocalDevice::hostModeStateChanged); + connect(localDevice, &QBluetoothLocalDevice::pairingFinished, + this, &BtLocalDevice::pairingFinished); + connect(localDevice, &QBluetoothLocalDevice::deviceConnected, + this, &BtLocalDevice::connected); + connect(localDevice, &QBluetoothLocalDevice::deviceDisconnected, + this, &BtLocalDevice::disconnected); + connect(localDevice, &QBluetoothLocalDevice::pairingDisplayConfirmation, + this, &BtLocalDevice::pairingDisplayConfirmation); connect(localDevice, &QBluetoothLocalDevice::pairingDisplayPinCode, this, &BtLocalDevice::pairingDisplayPinCode); if (localDevice->isValid()) { deviceAgent = new QBluetoothDeviceDiscoveryAgent(this); - connect(deviceAgent, SIGNAL(deviceDiscovered(QBluetoothDeviceInfo)), - this, SLOT(deviceDiscovered(QBluetoothDeviceInfo))); - connect(deviceAgent, SIGNAL(finished()), - this, SLOT(discoveryFinished())); - connect(deviceAgent, SIGNAL(error(QBluetoothDeviceDiscoveryAgent::Error)), - this, SLOT(discoveryError(QBluetoothDeviceDiscoveryAgent::Error))); - connect(deviceAgent, SIGNAL(canceled()), - this, SLOT(discoveryCanceled())); + connect(deviceAgent, &QBluetoothDeviceDiscoveryAgent::deviceDiscovered, + this, &BtLocalDevice::deviceDiscovered); + connect(deviceAgent, &QBluetoothDeviceDiscoveryAgent::finished, + this, &BtLocalDevice::discoveryFinished); + connect(deviceAgent, QOverload<QBluetoothDeviceDiscoveryAgent::Error>::of(&QBluetoothDeviceDiscoveryAgent::error), + this, &BtLocalDevice::discoveryError); + connect(deviceAgent, &QBluetoothDeviceDiscoveryAgent::canceled, + this, &BtLocalDevice::discoveryCanceled); serviceAgent = new QBluetoothServiceDiscoveryAgent(this); - connect(serviceAgent, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)), - this, SLOT(serviceDiscovered(QBluetoothServiceInfo))); - connect(serviceAgent, SIGNAL(finished()), - this, SLOT(serviceDiscoveryFinished())); - connect(serviceAgent, SIGNAL(canceled()), - this, SLOT(serviceDiscoveryCanceled())); - connect(serviceAgent, SIGNAL(error(QBluetoothServiceDiscoveryAgent::Error)), - this, SLOT(serviceDiscoveryError(QBluetoothServiceDiscoveryAgent::Error))); + connect(serviceAgent, &QBluetoothServiceDiscoveryAgent::serviceDiscovered, + this, &BtLocalDevice::serviceDiscovered); + connect(serviceAgent, &QBluetoothServiceDiscoveryAgent::finished, + this, &BtLocalDevice::serviceDiscoveryFinished); + connect(serviceAgent, &QBluetoothServiceDiscoveryAgent::canceled, + this, &BtLocalDevice::serviceDiscoveryCanceled); + connect(serviceAgent, QOverload<QBluetoothServiceDiscoveryAgent::Error>::of(&QBluetoothServiceDiscoveryAgent::error), + this, &BtLocalDevice::serviceDiscoveryError); socket = new QBluetoothSocket(SOCKET_PROTOCOL, this); - connect(socket, SIGNAL(stateChanged(QBluetoothSocket::SocketState)), - this, SLOT(socketStateChanged(QBluetoothSocket::SocketState))); - connect(socket, SIGNAL(error(QBluetoothSocket::SocketError)), - this, SLOT(socketError(QBluetoothSocket::SocketError))); - connect(socket, SIGNAL(connected()), this, SLOT(socketConnected())); - connect(socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected())); - connect(socket, SIGNAL(readyRead()), this, SLOT(readData())); + connect(socket, &QBluetoothSocket::stateChanged, + this, &BtLocalDevice::socketStateChanged); + connect(socket, QOverload<QBluetoothSocket::SocketError>::of(&QBluetoothSocket::error), + this, &BtLocalDevice::socketError); + connect(socket, &QBluetoothSocket::connected, this, &BtLocalDevice::socketConnected); + connect(socket, &QBluetoothSocket::disconnected, this, &BtLocalDevice::socketDisconnected); + connect(socket, &QIODevice::readyRead, this, &BtLocalDevice::readData); setSecFlags(static_cast<int>(socket->preferredSecurityFlags())); server = new QBluetoothServer(SOCKET_PROTOCOL, this); - connect(server, SIGNAL(newConnection()), this, SLOT(serverNewConnection())); - connect(server, SIGNAL(error(QBluetoothServer::Error)), - this, SLOT(serverError(QBluetoothServer::Error))); + connect(server, &QBluetoothServer::newConnection, this, &BtLocalDevice::serverNewConnection); + connect(server, QOverload<QBluetoothServer::Error>::of(&QBluetoothServer::error), + this, &BtLocalDevice::serverError); } else { deviceAgent = nullptr; serviceAgent = nullptr; @@ -675,13 +675,13 @@ void BtLocalDevice::serverNewConnection() } client->setParent(this); - connect(client, SIGNAL(disconnected()), this, SLOT(clientSocketDisconnected())); - connect(client, SIGNAL(readyRead()), this, SLOT(clientSocketReadyRead())); - connect(client, SIGNAL(stateChanged(QBluetoothSocket::SocketState)), - this, SLOT(socketStateChanged(QBluetoothSocket::SocketState))); - connect(client, SIGNAL(error(QBluetoothSocket::SocketError)), - this, SLOT(socketError(QBluetoothSocket::SocketError))); - connect(client, SIGNAL(connected()), this, SLOT(socketConnected())); + connect(client, &QBluetoothSocket::disconnected, this, &BtLocalDevice::clientSocketDisconnected); + connect(client, &QIODevice::readyRead, this, &BtLocalDevice::clientSocketReadyRead); + connect(client, &QBluetoothSocket::stateChanged, + this, &BtLocalDevice::socketStateChanged); + connect(client, QOverload<QBluetoothSocket::SocketError>::of(&QBluetoothSocket::error), + this, &BtLocalDevice::socketError); + connect(client, &QBluetoothSocket::connected, this, &BtLocalDevice::socketConnected); serverSockets.append(client); } |