equal
deleted
inserted
replaced
39 ** |
39 ** |
40 ****************************************************************************/ |
40 ****************************************************************************/ |
41 |
41 |
42 #include <QtTest/QtTest> |
42 #include <QtTest/QtTest> |
43 #include "../qbearertestcommon.h" |
43 #include "../qbearertestcommon.h" |
44 #include "qnetworkconfiguration.h" |
44 #include "../../../src/bearer/qnetworkconfiguration.h" |
45 #include "qnetworkconfigmanager.h" |
45 #include "../../../src/bearer/qnetworkconfigmanager.h" |
46 |
46 |
47 #ifdef Q_WS_MAEMO_6 |
47 #if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) |
48 #include <stdio.h> |
48 #include <stdio.h> |
49 #include <iapconf.h> |
49 #include <iapconf.h> |
50 #endif |
50 #endif |
51 |
51 |
52 QTM_USE_NAMESPACE |
52 QTM_USE_NAMESPACE |
63 void comparison(); |
63 void comparison(); |
64 void children(); |
64 void children(); |
65 void isRoamingAvailable(); |
65 void isRoamingAvailable(); |
66 |
66 |
67 private: |
67 private: |
68 #ifdef Q_WS_MAEMO_6 |
68 #if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) |
69 Maemo::IAPConf *iapconf; |
69 Maemo::IAPConf *iapconf; |
70 Maemo::IAPConf *iapconf2; |
70 Maemo::IAPConf *iapconf2; |
71 Maemo::IAPConf *gprsiap; |
71 Maemo::IAPConf *gprsiap; |
72 #define MAX_IAPS 50 |
72 #define MAX_IAPS 50 |
73 Maemo::IAPConf *iaps[MAX_IAPS]; |
73 Maemo::IAPConf *iaps[MAX_IAPS]; |
75 #endif |
75 #endif |
76 }; |
76 }; |
77 |
77 |
78 void tst_QNetworkConfiguration::initTestCase() |
78 void tst_QNetworkConfiguration::initTestCase() |
79 { |
79 { |
80 #ifdef Q_WS_MAEMO_6 |
80 #if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) |
81 iapconf = new Maemo::IAPConf("007"); |
81 iapconf = new Maemo::IAPConf("007"); |
82 iapconf->setValue("ipv4_type", "AUTO"); |
82 iapconf->setValue("ipv4_type", "AUTO"); |
83 iapconf->setValue("wlan_wepkey1", "connt"); |
83 iapconf->setValue("wlan_wepkey1", "connt"); |
84 iapconf->setValue("wlan_wepdefkey", 1); |
84 iapconf->setValue("wlan_wepdefkey", 1); |
85 iapconf->setValue("wlan_ssid", QByteArray("JamesBond")); |
85 iapconf->setValue("wlan_ssid", QByteArray("JamesBond")); |
148 #endif |
148 #endif |
149 } |
149 } |
150 |
150 |
151 void tst_QNetworkConfiguration::cleanupTestCase() |
151 void tst_QNetworkConfiguration::cleanupTestCase() |
152 { |
152 { |
153 #ifdef Q_WS_MAEMO_6 |
153 #if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) |
154 iapconf->clear(); |
154 iapconf->clear(); |
155 delete iapconf; |
155 delete iapconf; |
156 iapconf2->clear(); |
156 iapconf2->clear(); |
157 delete iapconf2; |
157 delete iapconf2; |
158 gprsiap->clear(); |
158 gprsiap->clear(); |