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 | |||
@@ -8,7 +8,12 @@ | |||
8 | /** | 8 | /** |
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 | ||
14 | /** | 19 | /** |
@@ -42,12 +47,7 @@ QString PPPModule::getPixmapName(Interface* ){ | |||
42 | * @return bool true if i is owned by this module, false otherwise. | 47 | * @return bool true if i is owned by this module, false otherwise. |
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 | ||
53 | /** | 53 | /** |
@@ -56,8 +56,8 @@ bool PPPModule::isOwner(Interface *i){ | |||
56 | */ | 56 | */ |
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 | } |
63 | 63 | ||
@@ -97,8 +97,12 @@ Interface *PPPModule::addNewInterface(const QString &newInterface){ | |||
97 | imp.showMaximized(); | 97 | imp.showMaximized(); |
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; |
104 | } | 108 | } |
@@ -114,8 +118,8 @@ bool PPPModule::remove(Interface*){ | |||
114 | 118 | ||
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 | ||
121 | 125 | ||