summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/doc/snippets
diff options
context:
space:
mode:
authorAndreas Buhr <andreas@andreasbuhr.de>2021-02-22 12:37:00 +0100
committerAndreas Buhr <andreas@andreasbuhr.de>2021-02-26 11:49:59 +0100
commit6e7911f94906571975555438d9a99ddec3b5bb46 (patch)
tree89ead58100dabc2ffa0509043be0b6b0dde9c7ef /src/bluetooth/doc/snippets
parent143bcc5b8e2adca497c901fa18d754efd97dade0 (diff)
Remove QBluetoothTransferManager and friends
This patch removes QBluetoothTransferManager, QBluetoothTransferReply and QBluetoothTransferRequest. Furthermore, the examples "btfiletransfer" and "picturetransfer" are removed. Fixes: QTBUG-75353 Task-number: QTBUG-62877 Change-Id: Ife192d80196249185df877fb6a4cae317d7e44ad Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/doc/snippets')
-rw-r--r--src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
index bb3b702c..870f7cdf 100644
--- a/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
+++ b/src/bluetooth/doc/snippets/doc_src_qtbluetooth.cpp
@@ -57,9 +57,6 @@
#include <QtCore/QObject>
#include <QtBluetooth/QBluetoothDeviceDiscoveryAgent>
#include <QtBluetooth/QBluetoothServiceDiscoveryAgent>
-#include <QtBluetooth/QBluetoothTransferManager>
-#include <QtBluetooth/QBluetoothTransferRequest>
-#include <QtBluetooth/QBluetoothTransferReply>
#include <QtBluetooth/QLowEnergyController>
#include <QtBluetooth/QLowEnergyService>
@@ -84,8 +81,6 @@ public:
public slots:
void deviceDiscovered(const QBluetoothDeviceInfo &device);
void serviceDiscovered(const QBluetoothServiceInfo &service);
- void transferFinished(QBluetoothTransferReply* reply);
- void error(QBluetoothTransferReply::TransferError errorType);
void characteristicChanged(const QLowEnergyCharacteristic& ,const QByteArray&);
};
@@ -160,40 +155,6 @@ void MyClass::serviceDiscovered(const QBluetoothServiceInfo &service)
}
//! [service_discovery]
-void MyClass::objectPush()
-{
-//! [sendfile]
-// Create a transfer manager
-QBluetoothTransferManager *transferManager = new QBluetoothTransferManager(this);
-
-// Create the transfer request and file to be sent
-QBluetoothAddress remoteAddress("00:11:22:33:44:55:66");
-QBluetoothTransferRequest request(remoteAddress);
-QFile *file = new QFile("testfile.txt");
-
-// Ask the transfer manager to send it
-QBluetoothTransferReply *reply = transferManager->put(request, file);
-if (reply->error() == QBluetoothTransferReply::NoError) {
-
- // Connect to the reply's signals to be informed about the status and do cleanups when done
- QObject::connect(reply, SIGNAL(finished(QBluetoothTransferReply*)),
- this, SLOT(transferFinished(QBluetoothTransferReply*)));
- QObject::connect(reply, SIGNAL(error(QBluetoothTransferReply::TransferError)),
- this, SLOT(error(QBluetoothTransferReply::TransferError)));
-} else {
- qWarning() << "Cannot push testfile.txt:" << reply->errorString();
-}
-//! [sendfile]
-}
-
-void MyClass::transferFinished(QBluetoothTransferReply* /*reply*/)
-{
-}
-
-void MyClass::error(QBluetoothTransferReply::TransferError /*errorType*/)
-{
-}
-
void MyClass::characteristicChanged(const QLowEnergyCharacteristic &, const QByteArray &)
{
}