summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppmodule.cpp
authortille <tille>2003-05-25 18:19:04 (UTC)
committer tille <tille>2003-05-25 18:19:04 (UTC)
commit2ec401058a04c15d2725c94d38226d0ac4505496 (patch) (side-by-side diff)
treebbe34da6b452cb01f31e5a08acf114c8c9641c32 /noncore/settings/networksettings/ppp/pppmodule.cpp
parent7e1dce1560e45ef7fad91a8da2d0d96c1b166df9 (diff)
downloadopie-2ec401058a04c15d2725c94d38226d0ac4505496.zip
opie-2ec401058a04c15d2725c94d38226d0ac4505496.tar.gz
opie-2ec401058a04c15d2725c94d38226d0ac4505496.tar.bz2
saves configured interfaces now
Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp17
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
@@ -10,20 +10,31 @@
*/
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