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) (unidiff)
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) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp23
1 files changed, 17 insertions, 6 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,19 +10,30 @@
10 */ 10 */
11PPPModule::PPPModule() : Module() 11PPPModule::PPPModule() : Module()
12{ 12{
13 QMap<QString,QString> ifaces = PPPData::data()->getConfiguredInterfaces();
14 QMap<QString,QString>::Iterator it;
13 Interface *iface; 15 Interface *iface;
14 iface = new Interface( 0, "device" ); 16 qDebug("getting interfaces");
15 iface->setHardwareName( "account" ); 17 for( it = ifaces.begin(); it != ifaces.end(); ++it ){
16 list.append( iface ); 18 qDebug("ifaces %s", it.key().latin1());
19 iface = new Interface( 0, it.key() );
20 iface->setHardwareName( it.data() );
21 list.append( iface );
22 }
17} 23}
18 24
19/** 25/**
20 * Delete any interfaces that we own. 26 * Delete any interfaces that we own.
21 */ 27 */
22PPPModule::~PPPModule(){ 28PPPModule::~PPPModule(){
23 Interface *i; 29 QMap<QString,QString> ifaces;
24 for ( i=list.first(); i != 0; i=list.next() ) 30 Interface *i;
25 delete i; 31 for ( i=list.first(); i != 0; i=list.next() ){
32 ifaces.insert( i->getInterfaceName(), i->getHardwareName() );
33 delete i;
34 }
35 PPPData::data()->setConfiguredInterfaces( ifaces );
36 PPPData::data()->save();
26} 37}
27 38
28/** 39/**