summaryrefslogtreecommitdiffstats
path: root/tests/auto/qbluetoothtransfermanager
diff options
context:
space:
mode:
authoralex <alex.blasche@nokia.com>2012-02-07 16:59:47 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-08 14:01:13 +0100
commit09defae552883e1d673021772e51fdce81838560 (patch)
tree775409288b3b3178d60556be6d9d9d2b9f49616d /tests/auto/qbluetoothtransfermanager
parent79095c3fbc97abd0138b91bb1833628f1d09fdad (diff)
No more Bluetooth on Symbian
This change cleans the code base significantly. Change-Id: I668d05d72cf5aa896818139e2daba51909c0b9dd Reviewed-by: Michael Zanetti <michael.zanetti@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'tests/auto/qbluetoothtransfermanager')
-rw-r--r--tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro2
-rw-r--r--tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp142
2 files changed, 0 insertions, 144 deletions
diff --git a/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro b/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro
index cba068be..a2003298 100644
--- a/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro
+++ b/tests/auto/qbluetoothtransfermanager/qbluetoothtransfermanager.pro
@@ -7,6 +7,4 @@ QT = core concurrent bluetooth testlib
INCLUDEPATH += ../../../tests/btclient
DEPENDPATH += ../../../tests/btclient
-symbian: TARGET.CAPABILITY = All-TCB #ReadDeviceData LocalServices WriteDeviceData
-
CONFIG += insignificant_test # QTBUG-22017
diff --git a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
index 7b5f8224..8c2e6346 100644
--- a/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
+++ b/tests/auto/qbluetoothtransfermanager/tst_qbluetoothtransfermanager.cpp
@@ -61,12 +61,7 @@ QTBLUETOOTH_USE_NAMESPACE
typedef QMap<int,QVariant> tst_QBluetoothTransferManager_QParameterMap;
Q_DECLARE_METATYPE(tst_QBluetoothTransferManager_QParameterMap)
-#ifdef Q_OS_SYMBIAN
-char BTADDRESS[] = "00:09:DD:50:93:DD";
-static const QString testfile("c:\\data\\testdata.txt");
-#else
char BTADDRESS[] = "00:00:00:00:00:00";
-#endif
static const int MaxConnectTime = 60 * 1000; // 1 minute in ms
@@ -121,7 +116,6 @@ void tst_QBluetoothTransferManager::initTestCase()
device->powerOn();
delete device;
-#ifndef Q_OS_SYMBIAN
// Go find an echo server for BTADDRESS
QBluetoothServiceDiscoveryAgent *sda = new QBluetoothServiceDiscoveryAgent(this);
connect(sda, SIGNAL(serviceDiscovered(QBluetoothServiceInfo)), this, SLOT(serviceDiscovered(QBluetoothServiceInfo)));
@@ -144,7 +138,6 @@ void tst_QBluetoothTransferManager::initTestCase()
QFAIL("Unable to find test service");
}
delete sda;
-#endif
}
void tst_QBluetoothTransferManager::error(QBluetoothServiceDiscoveryAgent::Error error)
{
@@ -198,42 +191,6 @@ void tst_QBluetoothTransferManager::tst_put()
}
QBluetoothTransferManager manager;
-
-#ifdef Q_OS_SYMBIAN
- {
- QFile fileToWrite(testfile);
- if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text))
- return;
-
- QTextStream out(&fileToWrite);
- out << "This_is_testdata!!!";
- fileToWrite.close();
- }
-
- QFile file(testfile);
- if (!file.exists())
- return;
-
- QBluetoothTransferReply *reply = manager.put(transferRequest, &file);
- int connectTime = MaxConnectTime;
-
- QSignalSpy finishedSpy(&manager, SIGNAL(finished(QBluetoothTransferReply*)));
- while (finishedSpy.count() == 0 && connectTime > 0) {
- QTest::qWait(1000);
- connectTime -= 1000;
- }
- QCOMPARE(finishedSpy.count(), 1);
-
- int error = reply->error();
- qDebug()<<"QtBluetoothTester::SendData reply->error ="<<error;
- QVERIFY(error == QBluetoothTransferReply::NoError);
-
- if (error != QBluetoothTransferReply::NoError) {
- qDebug() << "Failed to send file";
- }
- delete reply;
- file.close();
-#endif
}
void tst_QBluetoothTransferManager::tst_putAbort_data()
@@ -261,35 +218,6 @@ void tst_QBluetoothTransferManager::tst_putAbort()
}
QBluetoothTransferManager manager;
-
-#ifdef Q_OS_SYMBIAN
- {
- QFile fileToWrite(testfile);
- if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text))
- return;
-
- QTextStream out(&fileToWrite);
- out << "This_is_testdata!!!";
- fileToWrite.close();
- }
-
- QFile file(testfile);
- if (!file.exists())
- return;
-
- QBluetoothTransferReply *reply = manager.put(transferRequest, &file);
- reply->abort();
-
- int error = reply->error();
- qDebug()<<"QtBluetoothTester::SendData reply->error ="<<error;
- QVERIFY(error == QBluetoothTransferReply::NoError);
-
- if (error != QBluetoothTransferReply::NoError) {
- qDebug() << "Failed to send file";
- }
- delete reply;
- file.close();
-#endif
}
void tst_QBluetoothTransferManager::tst_attribute_data()
@@ -317,32 +245,6 @@ void tst_QBluetoothTransferManager::tst_attribute()
}
QBluetoothTransferManager manager;
-
-#ifdef Q_OS_SYMBIAN
- {
- QFile fileToWrite(testfile);
- if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text))
- return;
-
- QTextStream out(&fileToWrite);
- out << "This_is_testdata!!!";
- fileToWrite.close();
- }
-
- QFile file(testfile);
- if (!file.exists())
- return;
-
- QBluetoothTransferReply *reply = manager.put(transferRequest, &file);
- reply->abort();
-
- QVERIFY(reply->attribute(QBluetoothTransferRequest::DescriptionAttribute) == QVariant("Desciption"));
- QVERIFY(reply->attribute(QBluetoothTransferRequest::LengthAttribute) == QVariant("1024"));
- QVERIFY(reply->attribute(QBluetoothTransferRequest::TypeAttribute) == QVariant("OPP"));
-
- delete reply;
- file.close();
-#endif
}
void tst_QBluetoothTransferManager::tst_operation_data()
@@ -358,28 +260,6 @@ void tst_QBluetoothTransferManager::tst_operation()
QBluetoothTransferRequest transferRequest(address);
QBluetoothTransferManager manager;
-#ifdef Q_OS_SYMBIAN
- {
- QFile fileToWrite(testfile);
- if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text))
- return;
-
- QTextStream out(&fileToWrite);
- out << "This_is_testdata!!!";
- fileToWrite.close();
- }
-
- QFile file(testfile);
- if (!file.exists())
- return;
-
- QBluetoothTransferReply *reply = manager.put(transferRequest, &file);
-
- QVERIFY(reply->operation() == QBluetoothTransferManager::PutOperation);
-
- delete reply;
- file.close();
-#endif
}
void tst_QBluetoothTransferManager::tst_manager_data()
@@ -395,28 +275,6 @@ void tst_QBluetoothTransferManager::tst_manager()
QBluetoothTransferRequest transferRequest(address);
QBluetoothTransferManager manager;
-#ifdef Q_OS_SYMBIAN
- {
- QFile fileToWrite(testfile);
- if (!fileToWrite.open(QIODevice::WriteOnly | QIODevice::Text))
- return;
-
- QTextStream out(&fileToWrite);
- out << "This_is_testdata!!!";
- fileToWrite.close();
- }
-
- QFile file(testfile);
- if (!file.exists())
- return;
-
- QBluetoothTransferReply *reply = manager.put(transferRequest, &file);
-
- QVERIFY(reply->manager() == &manager);
-
- delete reply;
- file.close();
-#endif
}
QTEST_MAIN(tst_QBluetoothTransferManager)