Diffstat (limited to 'noncore/settings/networksettings/ppp/pppmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index da17e26..e13f8c8 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -9,5 +9,10 @@ | |||
9 | * Constructor, find all of the possible interfaces | 9 | * Constructor, find all of the possible interfaces |
10 | */ | 10 | */ |
11 | PPPModule::PPPModule() : Module() { | 11 | PPPModule::PPPModule() : Module() |
12 | { | ||
13 | Interface *iface; | ||
14 | iface = new Interface( 0, "device" ); | ||
15 | iface->setHardwareName( "account" ); | ||
16 | list.append( iface ); | ||
12 | } | 17 | } |
13 | 18 | ||
@@ -43,10 +48,5 @@ QString PPPModule::getPixmapName(Interface* ){ | |||
43 | */ | 48 | */ |
44 | bool PPPModule::isOwner(Interface *i){ | 49 | bool PPPModule::isOwner(Interface *i){ |
45 | if(!i->getInterfaceName().upper().contains("PPP")) | 50 | return list.find( i ) != -1; |
46 | return false; | ||
47 | |||
48 | i->setHardwareName("PPP"); | ||
49 | list.append(i); | ||
50 | return true; | ||
51 | } | 51 | } |
52 | 52 | ||
@@ -57,6 +57,6 @@ bool PPPModule::isOwner(Interface *i){ | |||
57 | QWidget *PPPModule::configure(Interface *i){ | 57 | QWidget *PPPModule::configure(Interface *i){ |
58 | qDebug("return ModemWidget"); | 58 | qDebug("return ModemWidget"); |
59 | PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, Qt::WDestructiveClose ); | 59 | PPPConfigWidget *pppconfig = new PPPConfigWidget( 0, "PPPConfig", false, |
60 | // pppconfig->setProfile(profile); | 60 | Qt::WDestructiveClose ); |
61 | return pppconfig; | 61 | return pppconfig; |
62 | } | 62 | } |
@@ -98,6 +98,10 @@ Interface *PPPModule::addNewInterface(const QString &newInterface){ | |||
98 | if(imp.exec() == QDialog::Accepted ){ | 98 | if(imp.exec() == QDialog::Accepted ){ |
99 | qDebug("ACCEPTED"); | 99 | qDebug("ACCEPTED"); |
100 | return new Interface( 0, newInterface ); | ||
101 | PPPData::data()->save(); | 100 | PPPData::data()->save(); |
101 | Interface *iface; | ||
102 | iface = new Interface( 0, PPPData::data()->modemDevice() ); | ||
103 | iface->setHardwareName( PPPData::data()->accname() ); | ||
104 | list.append( iface ); | ||
105 | return iface; | ||
102 | } | 106 | } |
103 | return NULL; | 107 | return NULL; |
@@ -115,6 +119,6 @@ bool PPPModule::remove(Interface*){ | |||
115 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 119 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) |
116 | { | 120 | { |
117 | qDebug("here"); | 121 | newIfaces.insert(QObject::tr("PPP") , |
118 | newIfaces.insert(QObject::tr("PPP") ,QObject::tr("generic ppp device")); | 122 | QObject::tr("generic ppp device")); |
119 | } | 123 | } |
120 | 124 | ||