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 | |||
@@ -11,9 +11,15 @@ | |||
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 ){ |
18 | qDebug("ifaces %s", it.key().latin1()); | ||
19 | iface = new Interface( 0, it.key() ); | ||
20 | iface->setHardwareName( it.data() ); | ||
16 | list.append( iface ); | 21 | list.append( iface ); |
17 | } | 22 | } |
23 | } | ||
18 | 24 | ||
19 | /** | 25 | /** |
@@ -21,8 +27,13 @@ PPPModule::PPPModule() : Module() | |||
21 | */ | 27 | */ |
22 | PPPModule::~PPPModule(){ | 28 | PPPModule::~PPPModule(){ |
29 | QMap<QString,QString> ifaces; | ||
23 | Interface *i; | 30 | Interface *i; |
24 | for ( i=list.first(); i != 0; i=list.next() ) | 31 | for ( i=list.first(); i != 0; i=list.next() ){ |
32 | ifaces.insert( i->getInterfaceName(), i->getHardwareName() ); | ||
25 | delete i; | 33 | delete i; |
26 | } | 34 | } |
35 | PPPData::data()->setConfiguredInterfaces( ifaces ); | ||
36 | PPPData::data()->save(); | ||
37 | } | ||
27 | 38 | ||
28 | /** | 39 | /** |