-rw-r--r-- | noncore/settings/networksettings/ppp/pppmodule.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index b102a10..fb279ee 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp | |||
@@ -1,31 +1,32 @@ | |||
1 | 1 | ||
2 | #include "modem.h" | 2 | #include "modem.h" |
3 | #include "pppconfig.h" | 3 | #include "pppconfig.h" |
4 | #include "pppmodule.h" | 4 | #include "pppmodule.h" |
5 | #include "pppdata.h" | 5 | #include "pppdata.h" |
6 | #include "interfaceinformationppp.h" | 6 | #include "interfaceinformationppp.h" |
7 | #include "interfaceppp.h" | 7 | #include "interfaceppp.h" |
8 | 8 | ||
9 | /* OPIE */ | 9 | /* OPIE */ |
10 | #include <opie2/odebug.h> | 10 | #include <opie2/odebug.h> |
11 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
12 | #include <qpe/qpeapplication.h> | 12 | #include <qpe/qpeapplication.h> |
13 | using namespace Opie::Core; | 13 | using namespace Opie::Core; |
14 | 14 | ||
15 | /* QT */ | 15 | /* QT */ |
16 | #include <qt.h> | ||
16 | 17 | ||
17 | /* STD */ | 18 | /* STD */ |
18 | #include <errno.h> | 19 | #include <errno.h> |
19 | #include <signal.h> | 20 | #include <signal.h> |
20 | 21 | ||
21 | // don't polute global namespace | 22 | // don't polute global namespace |
22 | namespace | 23 | namespace |
23 | { | 24 | { |
24 | /* | 25 | /* |
25 | * If network settings is qutting and we've ppp | 26 | * If network settings is qutting and we've ppp |
26 | * devices open we need to save the pid_t the PPData | 27 | * devices open we need to save the pid_t the PPData |
27 | * and the interface number | 28 | * and the interface number |
28 | */ | 29 | */ |
29 | struct Connection | 30 | struct Connection |
30 | { | 31 | { |
31 | pid_t pid; | 32 | pid_t pid; |
@@ -133,33 +134,33 @@ QString PPPModule::getPixmapName(Interface* ) | |||
133 | * @return bool true if i is owned by this module, false otherwise. | 134 | * @return bool true if i is owned by this module, false otherwise. |
134 | */ | 135 | */ |
135 | bool PPPModule::isOwner(Interface *i) | 136 | bool PPPModule::isOwner(Interface *i) |
136 | { | 137 | { |
137 | return list.find( i ) != -1; | 138 | return list.find( i ) != -1; |
138 | } | 139 | } |
139 | 140 | ||
140 | /** | 141 | /** |
141 | * Create, and return the WLANConfigure Module | 142 | * Create, and return the WLANConfigure Module |
142 | * @return QWidget* pointer to this modules configure. | 143 | * @return QWidget* pointer to this modules configure. |
143 | */ | 144 | */ |
144 | QWidget *PPPModule::configure(Interface *i) | 145 | QWidget *PPPModule::configure(Interface *i) |
145 | { | 146 | { |
146 | odebug << "return ModemWidget" << oendl; | 147 | odebug << "return ModemWidget" << oendl; |
147 | PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, | 148 | PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i, |
148 | 0, "PPPConfig", false, | 149 | 0, "PPPConfig", false, |
149 | (Qt::WDestructiveClose | Qt::WStyle_ContextHelp)); | 150 | ::Qt::WDestructiveClose | ::Qt::WStyle_ContextHelp); |
150 | return pppconfig; | 151 | return pppconfig; |
151 | } | 152 | } |
152 | 153 | ||
153 | /** | 154 | /** |
154 | * Create, and return the Information Module | 155 | * Create, and return the Information Module |
155 | * @return QWidget* pointer to this modules info. | 156 | * @return QWidget* pointer to this modules info. |
156 | */ | 157 | */ |
157 | QWidget *PPPModule::information(Interface *i) | 158 | QWidget *PPPModule::information(Interface *i) |
158 | { | 159 | { |
159 | // We don't have any advanced pppd information widget yet :-D | 160 | // We don't have any advanced pppd information widget yet :-D |
160 | // TODO ^ | 161 | // TODO ^ |
161 | 162 | ||
162 | return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i ); | 163 | return new InterfaceInformationPPP( 0, "InterfaceInformationPPP", i ); |
163 | } | 164 | } |
164 | 165 | ||
165 | /** | 166 | /** |
@@ -201,34 +202,34 @@ Interface *PPPModule::addNewInterface(const QString &newInterface) | |||
201 | iface = NULL; | 202 | iface = NULL; |
202 | } | 203 | } |
203 | return iface; | 204 | return iface; |
204 | } | 205 | } |
205 | 206 | ||
206 | /** | 207 | /** |
207 | * Attempts to remove the interface, doesn't delete i | 208 | * Attempts to remove the interface, doesn't delete i |
208 | * @return bool true if successful, false otherwise. | 209 | * @return bool true if successful, false otherwise. |
209 | */ | 210 | */ |
210 | bool PPPModule::remove(Interface *i) | 211 | bool PPPModule::remove(Interface *i) |
211 | { | 212 | { |
212 | return list.remove(i); | 213 | return list.remove(i); |
213 | } | 214 | } |
214 | 215 | ||
215 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) | 216 | void PPPModule::possibleNewInterfaces(QMap<QString, QString> &newIfaces) |
216 | { | 217 | { |
217 | newIfaces.insert(QObject::tr("PPP") , | 218 | newIfaces.insert(::QObject::tr("PPP") , |
218 | QObject::tr("generic ppp device")); | 219 | ::QObject::tr("generic ppp device")); |
219 | } | 220 | } |
220 | 221 | ||
221 | 222 | ||
222 | 223 | ||
223 | namespace | 224 | namespace |
224 | { | 225 | { |
225 | InterfaceKeeper::InterfaceKeeper( ) | 226 | InterfaceKeeper::InterfaceKeeper( ) |
226 | {} | 227 | {} |
227 | InterfaceKeeper::~InterfaceKeeper() | 228 | InterfaceKeeper::~InterfaceKeeper() |
228 | { | 229 | { |
229 | Config cfg("ppp_plugin_keeper"); | 230 | Config cfg("ppp_plugin_keeper"); |
230 | QStringList lst = cfg.groupList(); | 231 | QStringList lst = cfg.groupList(); |
231 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) | 232 | for (QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) |
232 | { | 233 | { |
233 | Connection con; | 234 | Connection con; |
234 | cfg.setGroup( (*it) ); | 235 | cfg.setGroup( (*it) ); |