Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index 3a97535..7cbccc2 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -9,22 +9,33 @@ * Constructor, find all of the possible interfaces */ PPPModule::PPPModule() : Module() { + QMap<QString,QString> ifaces = PPPData::data()->getConfiguredInterfaces(); + QMap<QString,QString>::Iterator it; Interface *iface; - iface = new Interface( 0, "device" ); - iface->setHardwareName( "account" ); + qDebug("getting interfaces"); + for( it = ifaces.begin(); it != ifaces.end(); ++it ){ + qDebug("ifaces %s", it.key().latin1()); + iface = new Interface( 0, it.key() ); + iface->setHardwareName( it.data() ); list.append( iface ); } +} /** * Delete any interfaces that we own. */ PPPModule::~PPPModule(){ + QMap<QString,QString> ifaces; Interface *i; - for ( i=list.first(); i != 0; i=list.next() ) + for ( i=list.first(); i != 0; i=list.next() ){ + ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); delete i; } + PPPData::data()->setConfiguredInterfaces( ifaces ); + PPPData::data()->save(); +} /** * Change the current profile */ |