Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index fb2f3e5..3a97535 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -58,3 +58,4 @@ QWidget *PPPModule::configure(Interface *i){ qDebug("return ModemWidget"); - PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, + PPPConfigWidget *pppconfig = new PPPConfigWidget( i, 0, "PPPConfig", + false, Qt::WDestructiveClose ); @@ -71,3 +72,3 @@ QWidget *PPPModule::information(Interface *i){ qDebug("return PPPModule::information"); - InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); + InterfaceInformationImp *information = new InterfaceInformationImp( 0, "InterfaceSetupImp", i); return information; @@ -96,14 +97,15 @@ Interface *PPPModule::addNewInterface(const QString &newInterface){ - PPPConfigWidget imp(0, "PPPConfigImp", true); + Interface *iface; + iface = new Interface(); + PPPConfigWidget imp(iface, 0, "PPPConfigImp", true); imp.showMaximized(); if(imp.exec() == QDialog::Accepted ){ - qDebug("ACCEPTED"); - PPPData::data()->save(); - Interface *iface; - iface = new Interface( 0, PPPData::data()->modemDevice() ); - iface->setHardwareName( PPPData::data()->accname() ); - list.append( iface ); - return iface; + iface->setModuleOwner( this ); + list.append( iface ); + return iface; + }else { + delete iface; + iface = NULL; } - return NULL; + return iface; } |