summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/pppmodule.cpp
Unidiff
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 @@
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 ){
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/**
20 * Delete any interfaces that we own. 26 * Delete any interfaces that we own.
21 */ 27 */
22PPPModule::~PPPModule(){ 28PPPModule::~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/**
29 * Change the current profile 40 * Change the current profile