summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/gestures/tst_gestures.cpp83
-rw-r--r--tests/auto/qlocale/tst_qlocale.cpp100
-rw-r--r--tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp8
-rw-r--r--tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp8
-rw-r--r--tests/auto/qnetworksession/test/tst_qnetworksession.cpp8
5 files changed, 175 insertions, 32 deletions
diff --git a/tests/auto/gestures/tst_gestures.cpp b/tests/auto/gestures/tst_gestures.cpp
index dfadf48..4a9f1d1 100644
--- a/tests/auto/gestures/tst_gestures.cpp
+++ b/tests/auto/gestures/tst_gestures.cpp
@@ -336,6 +336,7 @@ private slots:
void finishedWithoutStarted();
void unknownGesture();
void graphicsItemGesture();
+ void graphicsView();
void graphicsItemTreeGesture();
void explicitGraphicsObjectTarget();
void gestureOverChildGraphicsItem();
@@ -859,7 +860,6 @@ void tst_Gestures::graphicsItemGesture()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -908,6 +908,71 @@ void tst_Gestures::graphicsItemGesture()
QCOMPARE(item->gestureOverrideEventsReceived, 0);
}
+void tst_Gestures::graphicsView()
+{
+ QGraphicsScene scene;
+ QGraphicsView view(&scene);
+ view.setWindowFlags(Qt::X11BypassWindowManagerHint);
+
+ GestureItem *item = new GestureItem("item");
+ scene.addItem(item);
+ item->setPos(100, 100);
+
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+ view.ensureVisible(scene.sceneRect());
+
+ item->grabGesture(CustomGesture::GestureType);
+
+ static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
+ static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1;
+
+ CustomEvent event;
+ // make sure the event is properly delivered if only the hotspot is set.
+ event.hotSpot = mapToGlobal(QPointF(10, 10), item, &view);
+ event.hasHotSpot = true;
+ sendCustomGesture(&event, item, &scene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // change the viewport and try again
+ QWidget *newViewport = new QWidget;
+ view.setViewport(newViewport);
+
+ item->reset();
+ sendCustomGesture(&event, item, &scene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // change the scene and try again
+ QGraphicsScene newScene;
+ item = new GestureItem("newItem");
+ newScene.addItem(item);
+ item->setPos(100, 100);
+ view.setScene(&newScene);
+
+ item->reset();
+ // first without a gesture
+ sendCustomGesture(&event, item, &newScene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, 0);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+
+ // then grab the gesture and try again
+ item->reset();
+ item->grabGesture(CustomGesture::GestureType);
+ sendCustomGesture(&event, item, &newScene);
+
+ QCOMPARE(item->customEventsReceived, TotalCustomEventsCount);
+ QCOMPARE(item->gestureEventsReceived, TotalGestureEventsCount);
+ QCOMPARE(item->gestureOverrideEventsReceived, 0);
+}
+
void tst_Gestures::graphicsItemTreeGesture()
{
QGraphicsScene scene;
@@ -933,7 +998,6 @@ void tst_Gestures::graphicsItemTreeGesture()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -991,7 +1055,6 @@ void tst_Gestures::explicitGraphicsObjectTarget()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item2->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item2_child1->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
@@ -1051,7 +1114,6 @@ void tst_Gestures::gestureOverChildGraphicsItem()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item1->grabGesture(CustomGesture::GestureType);
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
@@ -1519,8 +1581,6 @@ void tst_Gestures::autoCancelGestures2()
parent->setPos(0, 0);
child->setPos(10, 10);
scene.addItem(parent);
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
- view.viewport()->grabGesture(secondGesture, Qt::DontStartGestureOnChildren);
parent->grabGesture(CustomGesture::GestureType);
child->grabGesture(secondGesture);
@@ -1573,7 +1633,6 @@ void tst_Gestures::graphicsViewParentPropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
item0->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
item1->grabGesture(CustomGesture::GestureType, Qt::ReceivePartialGestures | Qt::IgnoredGesturesPropagateToParent);
item1_c1->grabGesture(CustomGesture::GestureType, Qt::IgnoredGesturesPropagateToParent);
@@ -1644,8 +1703,6 @@ void tst_Gestures::panelPropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
static const int TotalCustomEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialMaybeThreshold + 1;
@@ -1757,8 +1814,6 @@ void tst_Gestures::panelStacksBehindParent()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
static const int TotalGestureEventsCount = CustomGesture::SerialFinishedThreshold - CustomGesture::SerialStartedThreshold + 1;
CustomEvent event;
@@ -1843,8 +1898,6 @@ void tst_Gestures::deleteGestureTargetItem()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
if (propagateUpdateGesture)
item2->ignoredUpdatedGestures << CustomGesture::GestureType;
connect(items.value(emitter, 0), signalName, items.value(receiver, 0), slotName);
@@ -1890,8 +1943,6 @@ void tst_Gestures::viewportCoordinates()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
CustomEvent event;
event.hotSpot = mapToGlobal(item1->boundingRect().center(), item1, &view);
event.hasHotSpot = true;
@@ -1929,8 +1980,6 @@ void tst_Gestures::partialGesturePropagation()
QTest::qWaitForWindowShown(&view);
view.ensureVisible(scene.sceneRect());
- view.viewport()->grabGesture(CustomGesture::GestureType, Qt::DontStartGestureOnChildren);
-
item1->ignoredUpdatedGestures << CustomGesture::GestureType;
CustomEvent event;
diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp
index 7a5d8a6..7e9b8ec 100644
--- a/tests/auto/qlocale/tst_qlocale.cpp
+++ b/tests/auto/qlocale/tst_qlocale.cpp
@@ -192,6 +192,7 @@ void tst_QLocale::ctor()
TEST_CTOR(French, France, QLocale::French, QLocale::France)
TEST_CTOR(C, France, QLocale::C, QLocale::AnyCountry)
+ TEST_CTOR(Spanish, LatinAmericaAndTheCaribbean, QLocale::Spanish, QLocale::LatinAmericaAndTheCaribbean)
QLocale::setDefault(QLocale(QLocale::English, QLocale::France));
@@ -323,6 +324,12 @@ void tst_QLocale::ctor()
TEST_CTOR("no_NO", Norwegian, Norway)
TEST_CTOR("nb_NO", Norwegian, Norway)
TEST_CTOR("nn_NO", NorwegianNynorsk, Norway)
+ TEST_CTOR("es_ES", Spanish, Spain)
+ TEST_CTOR("es_419", Spanish, LatinAmericaAndTheCaribbean)
+
+ // test default countries for languages
+ TEST_CTOR("mn", Mongolian, Mongolia)
+ TEST_CTOR("ne", Nepali, Nepal)
#undef TEST_CTOR
@@ -1321,10 +1328,12 @@ static const LocaleListItem g_locale_list[] = {
{ 9, 11}, // Armenian/Armenia
{ 10, 100}, // Assamese/India
{ 12, 15}, // Azerbaijani/Azerbaijan
+ { 12, 102}, // Azerbaijani/Iran
{ 14, 197}, // Basque/Spain
{ 15, 18}, // Bengali/Bangladesh
{ 15, 100}, // Bengali/India
{ 16, 25}, // Bhutani/Bhutan
+ { 19, 74}, // Breton/France
{ 20, 33}, // Bulgarian/Bulgaria
{ 21, 147}, // Burmese/Myanmar
{ 22, 20}, // Byelorussian/Belarus
@@ -1354,6 +1363,7 @@ static const LocaleListItem g_locale_list[] = {
{ 31, 107}, // English/Jamaica
{ 31, 133}, // English/Malta
{ 31, 134}, // English/MarshallIslands
+ { 31, 137}, // English/Mauritius
{ 31, 148}, // English/Namibia
{ 31, 154}, // English/NewZealand
{ 31, 160}, // English/NorthernMarianaIslands
@@ -1371,11 +1381,23 @@ static const LocaleListItem g_locale_list[] = {
{ 36, 73}, // Finnish/Finland
{ 37, 74}, // French/France
{ 37, 21}, // French/Belgium
+ { 37, 37}, // French/Cameroon
{ 37, 38}, // French/Canada
+ { 37, 41}, // French/CentralAfricanRepublic
+ { 37, 53}, // French/IvoryCoast
+ { 37, 88}, // French/Guadeloupe
+ { 37, 91}, // French/Guinea
{ 37, 125}, // French/Luxembourg
+ { 37, 128}, // French/Madagascar
+ { 37, 132}, // French/Mali
+ { 37, 135}, // French/Martinique
{ 37, 142}, // French/Monaco
+ { 37, 156}, // French/Niger
+ { 37, 176}, // French/Reunion
{ 37, 187}, // French/Senegal
{ 37, 206}, // French/Switzerland
+ { 37, 244}, // French/Saint Barthelemy
+ { 37, 245}, // French/Saint Martin
{ 40, 197}, // Galician/Spain
{ 41, 81}, // Georgian/Georgia
{ 42, 82}, // German/Germany
@@ -1406,6 +1428,9 @@ static const LocaleListItem g_locale_list[] = {
{ 64, 179}, // Kinyarwanda/Rwanda
{ 65, 116}, // Kirghiz/Kyrgyzstan
{ 66, 114}, // Korean/RepublicOfKorea
+ { 67, 102}, // Kurdish/Iran
+ { 67, 103}, // Kurdish/Iraq
+ { 67, 207}, // Kurdish/SyrianArabRepublic
{ 67, 217}, // Kurdish/Turkey
{ 69, 117}, // Laothian/Lao
{ 71, 118}, // Latvian/Latvia
@@ -1413,16 +1438,19 @@ static const LocaleListItem g_locale_list[] = {
{ 72, 50}, // Lingala/PeoplesRepublicOfCongo
{ 73, 124}, // Lithuanian/Lithuania
{ 74, 127}, // Macedonian/Macedonia
+ { 75, 128}, // Malagasy/Madagascar
{ 76, 130}, // Malay/Malaysia
{ 76, 32}, // Malay/BruneiDarussalam
{ 77, 100}, // Malayalam/India
{ 78, 133}, // Maltese/Malta
+ { 79, 154}, // Maori/NewZealand
{ 80, 100}, // Marathi/India
{ 82, 44}, // Mongolian/China
{ 82, 143}, // Mongolian/Mongolia
{ 84, 100}, // Nepali/India
{ 84, 150}, // Nepali/Nepal
{ 85, 161}, // Norwegian/Norway
+ { 86, 74}, // Occitan/France
{ 87, 100}, // Oriya/India
{ 88, 1}, // Pashto/Afghanistan
{ 89, 102}, // Persian/Iran
@@ -1430,22 +1458,30 @@ static const LocaleListItem g_locale_list[] = {
{ 90, 172}, // Polish/Poland
{ 91, 173}, // Portuguese/Portugal
{ 91, 30}, // Portuguese/Brazil
+ { 91, 92}, // Portuguese/GuineaBissau
+ { 91, 146}, // Portuguese/Mozambique
{ 92, 100}, // Punjabi/India
{ 92, 163}, // Punjabi/Pakistan
+ { 94, 206}, // RhaetoRomance/Switzerland
{ 95, 141}, // Romanian/Moldova
{ 95, 177}, // Romanian/Romania
{ 96, 178}, // Russian/RussianFederation
+ { 96, 141}, // Russian/Moldova
{ 96, 222}, // Russian/Ukraine
+ { 98, 41}, // Sangho/CentralAfricanRepublic
{ 99, 100}, // Sanskrit/India
{ 100, 241}, // Serbian/SerbiaAndMontenegro
{ 100, 27}, // Serbian/BosniaAndHerzegowina
{ 100, 238}, // Serbian/Yugoslavia
+ { 100, 242}, // Serbian/Montenegro
+ { 100, 243}, // Serbian/Serbia
{ 101, 241}, // SerboCroatian/SerbiaAndMontenegro
{ 101, 27}, // SerboCroatian/BosniaAndHerzegowina
{ 101, 238}, // SerboCroatian/Yugoslavia
{ 102, 120}, // Sesotho/Lesotho
{ 102, 195}, // Sesotho/SouthAfrica
{ 103, 195}, // Setswana/SouthAfrica
+ { 104, 240}, // Shona/Zimbabwe
{ 106, 198}, // Singhalese/SriLanka
{ 107, 195}, // Siswati/SouthAfrica
{ 107, 204}, // Siswati/Swaziland
@@ -1464,6 +1500,7 @@ static const LocaleListItem g_locale_list[] = {
{ 111, 61}, // Spanish/DominicanRepublic
{ 111, 63}, // Spanish/Ecuador
{ 111, 65}, // Spanish/ElSalvador
+ { 111, 66}, // Spanish/EquatorialGuinea
{ 111, 90}, // Spanish/Guatemala
{ 111, 96}, // Spanish/Honduras
{ 111, 139}, // Spanish/Mexico
@@ -1481,9 +1518,12 @@ static const LocaleListItem g_locale_list[] = {
{ 114, 73}, // Swedish/Finland
{ 116, 209}, // Tajik/Tajikistan
{ 117, 100}, // Tamil/India
+ { 117, 198}, // Tamil/SriLanka
{ 118, 178}, // Tatar/RussianFederation
{ 119, 100}, // Telugu/India
{ 120, 211}, // Thai/Thailand
+ { 121, 44}, // Tibetan/China
+ { 121, 100}, // Tibetan/India
{ 122, 67}, // Tigrinya/Eritrea
{ 122, 69}, // Tigrinya/Ethiopia
{ 123, 214}, // Tonga/Tonga
@@ -1524,9 +1564,63 @@ static const LocaleListItem g_locale_list[] = {
{ 160, 195}, // Venda/SouthAfrica
{ 161, 83}, // Ewe/Ghana
{ 161, 212}, // Ewe/Togo
+ { 162, 69}, // Walamo/Ethiopia
{ 163, 225}, // Hawaiian/UnitedStates
{ 164, 157}, // Tyap/Nigeria
- { 165, 129} // Chewa/Malawi
+ { 165, 129}, // Chewa/Malawi
+ { 166, 170}, // Filipino/Philippines
+ { 167, 206}, // Swiss German/Switzerland
+ { 168, 44}, // Sichuan Yi/China
+ { 169, 91}, // Kpelle/Guinea
+ { 169, 121}, // Kpelle/Liberia
+ { 170, 82}, // Low German/Germany
+ { 171, 195}, // South Ndebele/SouthAfrica
+ { 172, 195}, // Northern Sotho/SouthAfrica
+ { 173, 73}, // Northern Sami/Finland
+ { 173, 161}, // Northern Sami/Norway
+ { 174, 208}, // Taroko/Taiwan
+ { 175, 111}, // Gusii/Kenya
+ { 176, 111}, // Taita/Kenya
+ { 177, 187}, // Fulah/Senegal
+ { 178, 111}, // Kikuyu/Kenya
+ { 179, 111}, // Samburu/Kenya
+ { 180, 146}, // Sena/Mozambique
+ { 181, 240}, // North Ndebele/Zimbabwe
+ { 182, 210}, // Rombo/Tanzania
+ { 183, 145}, // Tachelhit/Morocco
+ { 184, 3}, // Kabyle/Algeria
+ { 185, 221}, // Nyankole/Uganda
+ { 186, 210}, // Bena/Tanzania
+ { 187, 210}, // Vunjo/Tanzania
+ { 188, 132}, // Bambara/Mali
+ { 189, 111}, // Embu/Kenya
+ { 190, 225}, // Cherokee/UnitedStates
+ { 191, 137}, // Morisyen/Mauritius
+ { 192, 210}, // Makonde/Tanzania
+ { 193, 210}, // Langi/Tanzania
+ { 194, 221}, // Ganda/Uganda
+ { 195, 239}, // Bemba/Zambia
+ { 196, 39}, // Kabuverdianu/CapeVerde
+ { 197, 111}, // Meru/Kenya
+ { 198, 111}, // Kalenjin/Kenya
+ { 199, 148}, // Nama/Namibia
+ { 200, 210}, // Machame/Tanzania
+ { 201, 82}, // Colognian/Germany
+ { 202, 111}, // Masai/Kenya
+ { 202, 210}, // Masai/Tanzania
+ { 203, 221}, // Soga/Uganda
+ { 204, 111}, // Luyia/Kenya
+ { 205, 210}, // Asu/Tanzania
+ { 206, 111}, // Teso/Kenya
+ { 206, 221}, // Teso/Uganda
+ { 207, 67}, // Saho/Eritrea
+ { 208, 132}, // Koyra Chiini/Mali
+ { 209, 210}, // Rwa/Tanzania
+ { 210, 111}, // Luo/Kenya
+ { 211, 221}, // Chiga/Uganda
+ { 212, 145}, // Central Morocco Tamazight/Morocco
+ { 213, 132}, // Koyraboro Senni/Mali
+ { 214, 210} // Shambala/Tanzania
};
static const int g_locale_list_count = sizeof(g_locale_list)/sizeof(g_locale_list[0]);
@@ -1896,8 +1990,8 @@ void tst_QLocale::ampm()
QCOMPARE(c.pmText(), QLatin1String("PM"));
QLocale de("de_DE");
- QCOMPARE(de.amText(), QLatin1String("AM"));
- QCOMPARE(de.pmText(), QLatin1String("PM"));
+ QCOMPARE(de.amText(), QLatin1String("vorm."));
+ QCOMPARE(de.pmText(), QLatin1String("nachm."));
QLocale sv("sv_SE");
QCOMPARE(sv.amText(), QLatin1String("fm"));
diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
index a3cccb2..e66719a 100644
--- a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
+++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp
@@ -52,7 +52,7 @@
*/
#include <QNetworkAccessManager>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -73,7 +73,7 @@ private slots:
void isRoamingAvailable();
private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -85,7 +85,7 @@ private:
void tst_QNetworkConfiguration::initTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -158,7 +158,7 @@ void tst_QNetworkConfiguration::initTestCase()
void tst_QNetworkConfiguration::cleanupTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
index 7cc527c..c732a5b 100644
--- a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
+++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp
@@ -45,7 +45,7 @@
#include <QtNetwork/qnetworkconfiguration.h>
#include <QtNetwork/qnetworkconfigmanager.h>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -67,7 +67,7 @@ private slots:
void configurationFromIdentifier();
private:
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -79,7 +79,7 @@ private:
void tst_QNetworkConfigurationManager::initTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -153,7 +153,7 @@ void tst_QNetworkConfigurationManager::initTestCase()
void tst_QNetworkConfigurationManager::cleanupTestCase()
{
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();
diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
index 934a50e..e4f2486 100644
--- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
+++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp
@@ -48,7 +48,7 @@
#include <QtNetwork/qnetworkconfigmanager.h>
#include <QtNetwork/qnetworksession.h>
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
#include <stdio.h>
#include <iapconf.h>
#endif
@@ -104,7 +104,7 @@ private:
int inProcessSessionManagementCount;
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
Maemo::IAPConf *iapconf;
Maemo::IAPConf *iapconf2;
Maemo::IAPConf *gprsiap;
@@ -140,7 +140,7 @@ void tst_QNetworkSession::initTestCase()
testsToRun["userChoiceSession"] = true;
testsToRun["sessionOpenCloseStop"] = true;
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf = new Maemo::IAPConf("007");
iapconf->setValue("ipv4_type", "AUTO");
iapconf->setValue("wlan_wepkey1", "connt");
@@ -226,7 +226,7 @@ void tst_QNetworkSession::cleanupTestCase()
"inProcessSessionManagement()");
}
-#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5)
+#if defined(Q_OS_UNIX) && !defined(QT_NO_ICD)
iapconf->clear();
delete iapconf;
iapconf2->clear();