Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 23 |
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 | |||
@@ -11,8 +11,14 @@ | |||
11 | PPPModule::PPPModule() : Module() | 11 | PPPModule::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 | ||
@@ -21,7 +27,12 @@ PPPModule::PPPModule() : Module() | |||
21 | */ | 27 | */ |
22 | PPPModule::~PPPModule(){ | 28 | PPPModule::~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 | ||