summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/TODO2
-rw-r--r--noncore/settings/networksettings/ppp/pppdata.cpp5
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp11
3 files changed, 9 insertions, 9 deletions
diff --git a/noncore/settings/networksettings/ppp/TODO b/noncore/settings/networksettings/ppp/TODO
index 529d236..5635438 100644
--- a/noncore/settings/networksettings/ppp/TODO
+++ b/noncore/settings/networksettings/ppp/TODO
@@ -1,7 +1,7 @@
- add possibility to input username and password ;)
- impl. PPPData::copyaccount & PPPData::deleteAccount
- update modem attribute inputs when modem has changed
- fix layout of edit account, i.e. get it shown maximised
- popup configure modem with the correct account prselected
not quite shure why it does not work... IMHO it should work
-- remove interfaces
+
diff --git a/noncore/settings/networksettings/ppp/pppdata.cpp b/noncore/settings/networksettings/ppp/pppdata.cpp
index 517dd8b..23db409 100644
--- a/noncore/settings/networksettings/ppp/pppdata.cpp
+++ b/noncore/settings/networksettings/ppp/pppdata.cpp
@@ -1240,17 +1240,20 @@ int PPPData::pppdError() const {
}
void PPPData::setpppdError(int err) {
pppderror = err;
}
QString PPPData::modemGroup()
{
- if (modemDeviceGroup<0)qFatal("wrong modem %i",modemDeviceGroup);
+ if (modemDeviceGroup<0){
+ qDebug("wrong modem %i\n using 0",modemDeviceGroup);
+ modemDeviceGroup = 0; //FIXME!
+ }
return QString("%1_%1").arg(MODEM_GRP).arg(modemDeviceGroup);
}
QMap<QString,QString> PPPData::getConfiguredInterfaces()
{
QMap<QString,QString> ifaces;
Config config = PPPData::config();
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index 95df068..8c401a9 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -100,42 +100,39 @@ QList<Interface> PPPModule::getInterfaces(){
/**
* Attempt to add a new interface as defined by name
* @param name the name of the type of interface that should be created given
* by possibleNewInterfaces();
* @return Interface* NULL if it was unable to be created.
*/
Interface *PPPModule::addNewInterface(const QString &newInterface){
- qDebug("try to add iface %s",newInterface.latin1());
-
InterfacePPP *ifaceppp;
Interface *iface;
ifaceppp = new InterfacePPP();
PPPConfigWidget imp(ifaceppp, 0, "PPPConfigImp", true);
imp.showMaximized();
if(imp.exec() == QDialog::Accepted ){
+ iface = (InterfacePPP*) ifaceppp;
iface->setModuleOwner( this );
- iface = ifaceppp;
list.append( iface );
return iface;
}else {
- delete iface;
+ delete ifaceppp;
iface = NULL;
}
return iface;
}
/**
* Attempts to remove the interface, doesn't delete i
* @return bool true if successfull, false otherwise.
*/
-bool PPPModule::remove(Interface*){
- // Can't remove a hardware device, you can stop it though.
- return false;
+bool PPPModule::remove(Interface *i){
+ return list.remove(i);
}
void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces)
{
newIfaces.insert(QObject::tr("PPP") ,
QObject::tr("generic ppp device"));
}