equal
deleted
inserted
replaced
160 CmConnectionMethodShim *cm = |
160 CmConnectionMethodShim *cm = |
161 mCmManagerShim->connectionMethod(connMethods[i]); |
161 mCmManagerShim->connectionMethod(connMethods[i]); |
162 QVERIFY(cm != NULL); |
162 QVERIFY(cm != NULL); |
163 bool ok = cm->deleteConnectionMethod(); |
163 bool ok = cm->deleteConnectionMethod(); |
164 QVERIFY(ok == true); |
164 QVERIFY(ok == true); |
|
165 cm->update(); |
165 delete cm; |
166 delete cm; |
166 } |
167 } |
167 |
168 |
168 // Check that tere is no longer any connection methods |
169 // Check that tere is no longer any connection methods |
169 mCmManagerShim->connectionMethod(connMethods, false); |
170 mCmManagerShim->connectionMethod(connMethods, false); |
638 int id = cm->getIntAttribute(CMManagerShim::CmId); |
639 int id = cm->getIntAttribute(CMManagerShim::CmId); |
639 QCOMPARE(id, 1); |
640 QCOMPARE(id, 1); |
640 |
641 |
641 // Check the default name |
642 // Check the default name |
642 QString name = cm->getStringAttribute(CMManagerShim::CmName); |
643 QString name = cm->getStringAttribute(CMManagerShim::CmName); |
643 QCOMPARE(name, QString("Connection Method")); |
644 QVERIFY(name != QString("")); |
644 |
645 |
645 // Change name |
646 // Change name |
646 cm->setStringAttribute(CMManagerShim::CmName, "WlanBlaaBlaa"); |
647 cm->setStringAttribute(CMManagerShim::CmName, "WlanBlaaBlaa"); |
647 // Do not update CommsDat |
648 // Do not update CommsDat |
648 |
649 |
793 CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod( |
794 CmConnectionMethodShim *cmWlan = mCmManagerShim->createConnectionMethod( |
794 CMManagerShim::BearerTypeWlan); |
795 CMManagerShim::BearerTypeWlan); |
795 QVERIFY(cmWlan != NULL); |
796 QVERIFY(cmWlan != NULL); |
796 // Update to CommsDat |
797 // Update to CommsDat |
797 cmWlan->update(); |
798 cmWlan->update(); |
798 |
799 |
799 uint cmWlanId = cmWlan->getIntAttribute(CMManagerShim::CmId); |
800 uint cmWlanId = cmWlan->getIntAttribute(CMManagerShim::CmId); |
800 QCOMPARE(cmWlanId, (uint)1); |
801 QCOMPARE(cmWlanId, (uint)1); |
801 |
802 |
802 // Add the connection method to the destination 1 |
803 // Add the connection method to the destination 1 |
803 int index = dest1->addConnectionMethod(cmWlan); |
804 int index = dest1->addConnectionMethod(cmWlan); |
1097 CmConnectionMethodShim *cm = |
1098 CmConnectionMethodShim *cm = |
1098 mCmManagerShim->connectionMethod(connMethods[i]); |
1099 mCmManagerShim->connectionMethod(connMethods[i]); |
1099 QVERIFY(cm != NULL); |
1100 QVERIFY(cm != NULL); |
1100 bool ok = cm->deleteConnectionMethod(); |
1101 bool ok = cm->deleteConnectionMethod(); |
1101 QVERIFY(ok == true); |
1102 QVERIFY(ok == true); |
|
1103 cm->update(); |
1102 delete cm; |
1104 delete cm; |
1103 } |
1105 } |
1104 } |
1106 } |