From 0e0eb207c4ada7a09c980b816dda1c5c6af1c027 Mon Sep 17 00:00:00 2001 From: Xizhi Zhu Date: Tue, 10 Jan 2012 04:41:30 +0200 Subject: Remove ICD plugin for bearer. It's only used by Maemo and Harmattan, thus not needed in Qt5. Change-Id: I8638f4fc63637be88d1aa584cde7e3a4116f2de6 Reviewed-by: Alex --- .../network/bearer/qnetworksession/test/test.pro | 6 -- .../qnetworksession/test/tst_qnetworksession.cpp | 108 +-------------------- 2 files changed, 1 insertion(+), 113 deletions(-) (limited to 'tests/auto/network/bearer/qnetworksession/test') diff --git a/tests/auto/network/bearer/qnetworksession/test/test.pro b/tests/auto/network/bearer/qnetworksession/test/test.pro index ad55a4223b..5567e35b02 100644 --- a/tests/auto/network/bearer/qnetworksession/test/test.pro +++ b/tests/auto/network/bearer/qnetworksession/test/test.pro @@ -14,9 +14,3 @@ CONFIG(debug_and_release) { } else { DESTDIR = .. } - -maemo6|maemo5 { - CONFIG += link_pkgconfig - - PKGCONFIG += conninet -} diff --git a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp index 544d3782a2..76fbac3368 100644 --- a/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp +++ b/tests/auto/network/bearer/qnetworksession/test/tst_qnetworksession.cpp @@ -48,18 +48,13 @@ #include #include -#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD) -#include -#include -#endif - QT_USE_NAMESPACE // Can be used to configure tests that require manual attention (such as roaming) //#define QNETWORKSESSION_MANUAL_TESTS 1 Q_DECLARE_METATYPE(QNetworkConfiguration) -Q_DECLARE_METATYPE(QNetworkConfiguration::Type); +Q_DECLARE_METATYPE(QNetworkConfiguration::Type) class tst_QNetworkSession : public QObject { @@ -97,15 +92,6 @@ private slots: private: QNetworkConfigurationManager manager; int inProcessSessionManagementCount; - -#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD) - Maemo::IAPConf *iapconf; - Maemo::IAPConf *iapconf2; - Maemo::IAPConf *gprsiap; -#define MAX_IAPS 10 - Maemo::IAPConf *iaps[MAX_IAPS]; - QProcess *icd_stub; -#endif }; // Helper functions @@ -120,76 +106,6 @@ void tst_QNetworkSession::initTestCase() qRegisterMetaType("QNetworkConfiguration"); qRegisterMetaType("QNetworkConfiguration::Type"); -#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD) - iapconf = new Maemo::IAPConf("007"); - iapconf->setValue("ipv4_type", "AUTO"); - iapconf->setValue("wlan_wepkey1", "connt"); - iapconf->setValue("wlan_wepdefkey", 1); - iapconf->setValue("wlan_ssid", QByteArray("JamesBond")); - iapconf->setValue("name", "James Bond"); - iapconf->setValue("type", "WLAN_INFRA"); - - gprsiap = new Maemo::IAPConf("This-is-GPRS-IAP"); - gprsiap->setValue("ask_password", false); - gprsiap->setValue("gprs_accesspointname", "internet"); - gprsiap->setValue("gprs_password", ""); - gprsiap->setValue("gprs_username", ""); - gprsiap->setValue("ipv4_autodns", true); - gprsiap->setValue("ipv4_type", "AUTO"); - gprsiap->setValue("sim_imsi", "244070123456789"); - gprsiap->setValue("name", "MI6"); - gprsiap->setValue("type", "GPRS"); - - iapconf2 = new Maemo::IAPConf("osso.net"); - iapconf2->setValue("ipv4_type", "AUTO"); - iapconf2->setValue("wlan_wepkey1", "osso.net"); - iapconf2->setValue("wlan_wepdefkey", 1); - iapconf2->setValue("wlan_ssid", QByteArray("osso.net")); - iapconf2->setValue("name", "osso.net"); - iapconf2->setValue("type", "WLAN_INFRA"); - iapconf2->setValue("wlan_security", "WEP"); - - /* Create large number of IAPs in the gconf and see what happens */ - fflush(stdout); - printf("Creating %d IAPS: ", MAX_IAPS); - for (int i=0; isetValue("name", QString("test-iap-")+num); - iaps[i]->setValue("type", "WLAN_INFRA"); - iaps[i]->setValue("wlan_ssid", QString(QString("test-ssid-")+num).toAscii()); - iaps[i]->setValue("wlan_security", "WPA_PSK"); - iaps[i]->setValue("EAP_wpa_preshared_passphrase", QString("test-passphrase-")+num); - printf("."); - fflush(stdout); - } - printf("\n"); - fflush(stdout); - - icd_stub = new QProcess(this); - icd_stub->start("/usr/bin/icd2_stub.py"); - QTest::qWait(1000); - - // Add a known network to scan list that icd2 stub returns - QProcess dbus_send; - // 007 network - dbus_send.start("dbus-send --type=method_call --system " - "--dest=com.nokia.icd2 /com/nokia/icd2 " - "com.nokia.icd2.testing.add_available_network " - "string:'' uint32:0 string:'' " - "string:WLAN_INFRA uint32:5000011 array:byte:48,48,55"); - dbus_send.waitForFinished(); - - // osso.net network - dbus_send.start("dbus-send --type=method_call --system " - "--dest=com.nokia.icd2 /com/nokia/icd2 " - "com.nokia.icd2.testing.add_available_network " - "string:'' uint32:0 string:'' " - "string:WLAN_INFRA uint32:83886097 array:byte:111,115,115,111,46,110,101,116"); - dbus_send.waitForFinished(); -#endif - inProcessSessionManagementCount = -1; QSignalSpy spy(&manager, SIGNAL(updateCompleted())); @@ -205,28 +121,6 @@ void tst_QNetworkSession::cleanupTestCase() qWarning("No usable configurations found to complete all possible tests in " "inProcessSessionManagement()"); } - -#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD) - iapconf->clear(); - delete iapconf; - iapconf2->clear(); - delete iapconf2; - gprsiap->clear(); - delete gprsiap; - - printf("Deleting %d IAPS : ", MAX_IAPS); - for (int i=0; iclear(); - delete iaps[i]; - printf("."); - fflush(stdout); - } - printf("\n"); - qDebug() << "Deleted" << MAX_IAPS << "IAPs"; - - icd_stub->terminate(); - icd_stub->waitForFinished(); -#endif } // Robustness test for calling interfaces in nonsense order / with nonsense parameters -- cgit v1.2.3