summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppmodule.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp24
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
@@ -57,5 +57,6 @@ bool PPPModule::isOwner(Interface *i){
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 );
return pppconfig;
@@ -70,5 +71,5 @@ QWidget *PPPModule::information(Interface *i){
// TODO ^
qDebug("return PPPModule::information");
- InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i);
+ InterfaceInformationImp *information = new InterfaceInformationImp( 0, "InterfaceSetupImp", i);
return information;
}
@@ -95,16 +96,17 @@ Interface *PPPModule::addNewInterface(const QString &newInterface){
qDebug("try to add iface %s",newInterface.latin1());
- 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;
}