summaryrefslogtreecommitdiff
authorbenmeyer <benmeyer>2002-11-01 18:46:04 (UTC)
committer benmeyer <benmeyer>2002-11-01 18:46:04 (UTC)
commit6860113387bbc86ee33e86327941cafc986e6481 (patch) (unidiff)
tree27b48df44c4bd0071efaf62148a26d84940e5c4b
parent2259e3ab9f2e06a4ee4dbd633c17221a47fdb7ba (diff)
downloadopie-6860113387bbc86ee33e86327941cafc986e6481.zip
opie-6860113387bbc86ee33e86327941cafc986e6481.tar.gz
opie-6860113387bbc86ee33e86327941cafc986e6481.tar.bz2
Removed Add test examples
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/mainwindowimp.cpp4
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp
index 3b0b7e8..7261c58 100644
--- a/noncore/net/networksetup/mainwindowimp.cpp
+++ b/noncore/net/networksetup/mainwindowimp.cpp
@@ -139,50 +139,50 @@ Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString)
139 return NULL; 139 return NULL;
140 } 140 }
141 141
142 // Try to get an object. 142 // Try to get an object.
143 Module *object = ((Module* (*)()) functionPointer)(); 143 Module *object = ((Module* (*)()) functionPointer)();
144 if(object == NULL){ 144 if(object == NULL){
145 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 145 qDebug("MainWindowImp: Couldn't create object, but did load library!");
146 delete lib; 146 delete lib;
147 return NULL; 147 return NULL;
148 } 148 }
149 149
150 // Store for deletion later 150 // Store for deletion later
151 libraries.insert(object, lib); 151 libraries.insert(object, lib);
152 return object; 152 return object;
153} 153}
154 154
155/** 155/**
156 * The Add button was clicked. Bring up the add dialog and if OK is hit 156 * The Add button was clicked. Bring up the add dialog and if OK is hit
157 * load the plugin and append it to the list 157 * load the plugin and append it to the list
158 */ 158 */
159void MainWindowImp::addClicked(){ 159void MainWindowImp::addClicked(){
160 QMap<Module*, QLibrary*>::Iterator it; 160 QMap<Module*, QLibrary*>::Iterator it;
161 QMap<QString, QString> list; 161 QMap<QString, QString> list;
162 QMap<QString, Module*> newInterfaceOwners; 162 QMap<QString, Module*> newInterfaceOwners;
163 list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port"); 163 //list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port");
164 list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port"); 164 //list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port");
165 for( it = libraries.begin(); it != libraries.end(); ++it ){ 165 for( it = libraries.begin(); it != libraries.end(); ++it ){
166 if(it.key()){ 166 if(it.key()){
167 (it.key())->possibleNewInterfaces(list); 167 (it.key())->possibleNewInterfaces(list);
168 } 168 }
169 } 169 }
170 // See if the list has anything that we can add. 170 // See if the list has anything that we can add.
171 if(list.count() == 0){ 171 if(list.count() == 0){
172 QMessageBox::information(this, "Sorry", "Nothing to add.", QMessageBox::Ok); 172 QMessageBox::information(this, "Sorry", "Nothing to add.", QMessageBox::Ok);
173 return; 173 return;
174 } 174 }
175 AddConnectionImp addNewConnection(this, "AddConnectionImp", true); 175 AddConnectionImp addNewConnection(this, "AddConnectionImp", true);
176 addNewConnection.addConnections(list); 176 addNewConnection.addConnections(list);
177 addNewConnection.showMaximized(); 177 addNewConnection.showMaximized();
178 if(QDialog::Accepted == addNewConnection.exec()){ 178 if(QDialog::Accepted == addNewConnection.exec()){
179 QListViewItem *item = addNewConnection.registeredServicesList->currentItem(); 179 QListViewItem *item = addNewConnection.registeredServicesList->currentItem();
180 if(!item) 180 if(!item)
181 return; 181 return;
182 182
183 for( it = libraries.begin(); it != libraries.end(); ++it ){ 183 for( it = libraries.begin(); it != libraries.end(); ++it ){
184 if(it.key()){ 184 if(it.key()){
185 Interface *i = (it.key())->addNewInterface(item->text(0)); 185 Interface *i = (it.key())->addNewInterface(item->text(0));
186 if(i){ 186 if(i){
187 interfaceNames.insert(i->getInterfaceName(), i); 187 interfaceNames.insert(i->getInterfaceName(), i);
188 updateInterface(i); 188 updateInterface(i);
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 3b0b7e8..7261c58 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -139,50 +139,50 @@ Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString)
139 return NULL; 139 return NULL;
140 } 140 }
141 141
142 // Try to get an object. 142 // Try to get an object.
143 Module *object = ((Module* (*)()) functionPointer)(); 143 Module *object = ((Module* (*)()) functionPointer)();
144 if(object == NULL){ 144 if(object == NULL){
145 qDebug("MainWindowImp: Couldn't create object, but did load library!"); 145 qDebug("MainWindowImp: Couldn't create object, but did load library!");
146 delete lib; 146 delete lib;
147 return NULL; 147 return NULL;
148 } 148 }
149 149
150 // Store for deletion later 150 // Store for deletion later
151 libraries.insert(object, lib); 151 libraries.insert(object, lib);
152 return object; 152 return object;
153} 153}
154 154
155/** 155/**
156 * The Add button was clicked. Bring up the add dialog and if OK is hit 156 * The Add button was clicked. Bring up the add dialog and if OK is hit
157 * load the plugin and append it to the list 157 * load the plugin and append it to the list
158 */ 158 */
159void MainWindowImp::addClicked(){ 159void MainWindowImp::addClicked(){
160 QMap<Module*, QLibrary*>::Iterator it; 160 QMap<Module*, QLibrary*>::Iterator it;
161 QMap<QString, QString> list; 161 QMap<QString, QString> list;
162 QMap<QString, Module*> newInterfaceOwners; 162 QMap<QString, Module*> newInterfaceOwners;
163 list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port"); 163 //list.insert("USB (PPP) / (ADD_TEST)", "A dialup connection over the USB port");
164 list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port"); 164 //list.insert("IrDa (PPP) / (ADD_TEST)", "A dialup connection over the IdDa port");
165 for( it = libraries.begin(); it != libraries.end(); ++it ){ 165 for( it = libraries.begin(); it != libraries.end(); ++it ){
166 if(it.key()){ 166 if(it.key()){
167 (it.key())->possibleNewInterfaces(list); 167 (it.key())->possibleNewInterfaces(list);
168 } 168 }
169 } 169 }
170 // See if the list has anything that we can add. 170 // See if the list has anything that we can add.
171 if(list.count() == 0){ 171 if(list.count() == 0){
172 QMessageBox::information(this, "Sorry", "Nothing to add.", QMessageBox::Ok); 172 QMessageBox::information(this, "Sorry", "Nothing to add.", QMessageBox::Ok);
173 return; 173 return;
174 } 174 }
175 AddConnectionImp addNewConnection(this, "AddConnectionImp", true); 175 AddConnectionImp addNewConnection(this, "AddConnectionImp", true);
176 addNewConnection.addConnections(list); 176 addNewConnection.addConnections(list);
177 addNewConnection.showMaximized(); 177 addNewConnection.showMaximized();
178 if(QDialog::Accepted == addNewConnection.exec()){ 178 if(QDialog::Accepted == addNewConnection.exec()){
179 QListViewItem *item = addNewConnection.registeredServicesList->currentItem(); 179 QListViewItem *item = addNewConnection.registeredServicesList->currentItem();
180 if(!item) 180 if(!item)
181 return; 181 return;
182 182
183 for( it = libraries.begin(); it != libraries.end(); ++it ){ 183 for( it = libraries.begin(); it != libraries.end(); ++it ){
184 if(it.key()){ 184 if(it.key()){
185 Interface *i = (it.key())->addNewInterface(item->text(0)); 185 Interface *i = (it.key())->addNewInterface(item->text(0));
186 if(i){ 186 if(i){
187 interfaceNames.insert(i->getInterfaceName(), i); 187 interfaceNames.insert(i->getInterfaceName(), i);
188 updateInterface(i); 188 updateInterface(i);