Diffstat (limited to 'noncore/settings/networksettings/ppp/interfaceppp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/interfaceppp.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp index f443f3c..5cc6f70 100644 --- a/noncore/settings/networksettings/ppp/interfaceppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp | |||
@@ -5,64 +5,64 @@ | |||
5 | #include <qlabel.h> | 5 | #include <qlabel.h> |
6 | 6 | ||
7 | #include "auth.h" | 7 | #include "auth.h" |
8 | #include "interfaceppp.h" | 8 | #include "interfaceppp.h" |
9 | #include "modem.h" | 9 | #include "modem.h" |
10 | #include "pppdata.h" | 10 | #include "pppdata.h" |
11 | 11 | ||
12 | InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) | 12 | InterfacePPP::InterfacePPP(QObject *parent, const char *name, bool status) |
13 | : Interface(parent, name, status), | 13 | : Interface(parent, name, status), |
14 | _modemPtr(0), | 14 | _modemPtr(0), |
15 | _dataPtr(0) | 15 | _dataPtr(0) |
16 | { | 16 | { |
17 | qDebug("InterfacePPP::InterfacePPP("); | 17 | odebug << "InterfacePPP::InterfacePPP(" << oendl; |
18 | } | 18 | } |
19 | 19 | ||
20 | PPPData* InterfacePPP::data()const | 20 | PPPData* InterfacePPP::data()const |
21 | { | 21 | { |
22 | if (!_dataPtr){ | 22 | if (!_dataPtr){ |
23 | qDebug("creating new Data obj"); | 23 | odebug << "creating new Data obj" << oendl; |
24 | _dataPtr = new PPPData(); | 24 | _dataPtr = new PPPData(); |
25 | _dataPtr->setDevice( getInterfaceName() ); | 25 | _dataPtr->setDevice( getInterfaceName() ); |
26 | _dataPtr->setAccount( getHardwareName() ); | 26 | _dataPtr->setAccount( getHardwareName() ); |
27 | } | 27 | } |
28 | return _dataPtr; | 28 | return _dataPtr; |
29 | } | 29 | } |
30 | 30 | ||
31 | Modem* InterfacePPP::modem()const | 31 | Modem* InterfacePPP::modem()const |
32 | { | 32 | { |
33 | if (!_modemPtr){ | 33 | if (!_modemPtr){ |
34 | qDebug("creating new modem obj"); | 34 | odebug << "creating new modem obj" << oendl; |
35 | _modemPtr = new Modem( data() ); | 35 | _modemPtr = new Modem( data() ); |
36 | } | 36 | } |
37 | return _modemPtr; | 37 | return _modemPtr; |
38 | } | 38 | } |
39 | 39 | ||
40 | bool InterfacePPP::refresh() | 40 | bool InterfacePPP::refresh() |
41 | { | 41 | { |
42 | qDebug("InterfacePPP::refresh()"); | 42 | odebug << "InterfacePPP::refresh()" << oendl; |
43 | QString old = getInterfaceName(); | 43 | QString old = getInterfaceName(); |
44 | setInterfaceName( modem()->pppDevice() ); | 44 | setInterfaceName( modem()->pppDevice() ); |
45 | 45 | ||
46 | (void)Interface::refresh(); | 46 | (void)Interface::refresh(); |
47 | 47 | ||
48 | setInterfaceName( old ); | 48 | setInterfaceName( old ); |
49 | emit updateInterface(this); | 49 | emit updateInterface(this); |
50 | 50 | ||
51 | return true; | 51 | return true; |
52 | } | 52 | } |
53 | 53 | ||
54 | void InterfacePPP::start() | 54 | void InterfacePPP::start() |
55 | { | 55 | { |
56 | qDebug("InterfacePPP::start"); | 56 | odebug << "InterfacePPP::start" << oendl; |
57 | 57 | ||
58 | if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) { | 58 | if (data()->password().isEmpty() && !data()->storedUsername().isEmpty() ) { |
59 | 59 | ||
60 | QDialog mb( 0, "Dialog", true ); | 60 | QDialog mb( 0, "Dialog", true ); |
61 | mb.setCaption( tr( "No password" ) ); | 61 | mb.setCaption( tr( "No password" ) ); |
62 | QVBoxLayout layout( &mb ); | 62 | QVBoxLayout layout( &mb ); |
63 | QLabel text ( &mb ); | 63 | QLabel text ( &mb ); |
64 | text.setText( tr("Username defined but no password\n Please enter a password") ); | 64 | text.setText( tr("Username defined but no password\n Please enter a password") ); |
65 | QLineEdit lineedit( &mb ); | 65 | QLineEdit lineedit( &mb ); |
66 | lineedit.setEchoMode( QLineEdit::Password ); | 66 | lineedit.setEchoMode( QLineEdit::Password ); |
67 | layout.addWidget( &text ); | 67 | layout.addWidget( &text ); |
68 | layout.addWidget( &lineedit ); | 68 | layout.addWidget( &lineedit ); |
@@ -134,30 +134,30 @@ void InterfacePPP::start() | |||
134 | if (data()->phonenumber().isEmpty()) { | 134 | if (data()->phonenumber().isEmpty()) { |
135 | QString s = QObject::tr("You must specify a telephone number!"); | 135 | QString s = QObject::tr("You must specify a telephone number!"); |
136 | QMessageBox::warning(0, tr("Error"), s); | 136 | QMessageBox::warning(0, tr("Error"), s); |
137 | return; | 137 | return; |
138 | } | 138 | } |
139 | 139 | ||
140 | // SEGFAULTS: | 140 | // SEGFAULTS: |
141 | // setStatus( true ); | 141 | // setStatus( true ); |
142 | // emit updateInterface((Interface*) this); | 142 | // emit updateInterface((Interface*) this); |
143 | 143 | ||
144 | emit begin_connect(); | 144 | emit begin_connect(); |
145 | 145 | ||
146 | qDebug("InterfacePPP::start END"); | 146 | odebug << "InterfacePPP::start END" << oendl; |
147 | } | 147 | } |
148 | 148 | ||
149 | void InterfacePPP::stop() | 149 | void InterfacePPP::stop() |
150 | { | 150 | { |
151 | qDebug("InterfacePPP::stop"); | 151 | odebug << "InterfacePPP::stop" << oendl; |
152 | // emit hangup_now(); | 152 | // emit hangup_now(); |
153 | status = false; // not connected | 153 | status = false; // not connected |
154 | setStatus( false ); | 154 | setStatus( false ); |
155 | emit hangup_now(); | 155 | emit hangup_now(); |
156 | refresh(); | 156 | refresh(); |
157 | 157 | ||
158 | } | 158 | } |
159 | 159 | ||
160 | void InterfacePPP::save() | 160 | void InterfacePPP::save() |
161 | { | 161 | { |
162 | data()->save(); | 162 | data()->save(); |
163 | emit updateInterface((Interface*) this); | 163 | emit updateInterface((Interface*) this); |