Diffstat (limited to 'noncore/settings/networksettings/ppp/interfaceppp.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/interfaceppp.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/noncore/settings/networksettings/ppp/interfaceppp.cpp b/noncore/settings/networksettings/ppp/interfaceppp.cpp index dc24824..98bb4da 100644 --- a/noncore/settings/networksettings/ppp/interfaceppp.cpp +++ b/noncore/settings/networksettings/ppp/interfaceppp.cpp | |||
@@ -42,18 +42,16 @@ bool InterfacePPP::refresh() | |||
42 | return false; | 42 | return false; |
43 | } | 43 | } |
44 | 44 | ||
45 | void InterfacePPP::start() | 45 | void InterfacePPP::start() |
46 | { | 46 | { |
47 | qDebug("InterfacePPP::start"); | 47 | qDebug("InterfacePPP::start"); |
48 | if (data()->storedPassword() != "" ){ | 48 | if (data()->password().isEmpty() ){ |
49 | data()->setPassword(data()->storedPassword()); | 49 | //FIXME: ask for password |
50 | }else{ | ||
51 | //FIXME: | ||
52 | qDebug("using dummy password"); | 50 | qDebug("using dummy password"); |
53 | data()->setPassword( "dummy" ); | 51 | QMessageBox::critical( 0, "no password", "you should be prompted for a password, but you are not! ;-)"); |
54 | } | 52 | } |
55 | 53 | ||
56 | 54 | ||
57 | QFileInfo info(pppdPath()); | 55 | QFileInfo info(pppdPath()); |
58 | 56 | ||
59 | if(!info.exists()){ | 57 | if(!info.exists()){ |
@@ -93,13 +91,13 @@ void InterfacePPP::start() | |||
93 | 91 | ||
94 | // if this is a PAP or CHAP account, ensure that username is | 92 | // if this is a PAP or CHAP account, ensure that username is |
95 | // supplied | 93 | // supplied |
96 | if(data()->authMethod() == AUTH_PAP || | 94 | if(data()->authMethod() == AUTH_PAP || |
97 | data()->authMethod() == AUTH_CHAP || | 95 | data()->authMethod() == AUTH_CHAP || |
98 | data()->authMethod() == AUTH_PAPCHAP ) { | 96 | data()->authMethod() == AUTH_PAPCHAP ) { |
99 | if(false){ //ID_Edit->text().isEmpty()) { | 97 | if(false){ //FIXME: ID_Edit->text().isEmpty()) { |
100 | QMessageBox::warning(0,tr("Error"), | 98 | QMessageBox::warning(0,tr("Error"), |
101 | i18n("<qt>You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!</qt>")); | 99 | i18n("<qt>You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!</qt>")); |
102 | // FIXME: return; | 100 | // FIXME: return; |
103 | } else { | 101 | } else { |
104 | if(!modem()->setSecret(data()->authMethod(), | 102 | if(!modem()->setSecret(data()->authMethod(), |
105 | PPPData::encodeWord(data()->storedUsername()), | 103 | PPPData::encodeWord(data()->storedUsername()), |
@@ -117,25 +115,26 @@ void InterfacePPP::start() | |||
117 | if (data()->phonenumber().isEmpty()) { | 115 | if (data()->phonenumber().isEmpty()) { |
118 | QString s = i18n("You must specify a telephone number!"); | 116 | QString s = i18n("You must specify a telephone number!"); |
119 | QMessageBox::warning(0, tr("Error"), s); | 117 | QMessageBox::warning(0, tr("Error"), s); |
120 | return; | 118 | return; |
121 | } | 119 | } |
122 | 120 | ||
123 | // this->hide(); | 121 | // SEGFAULTS: |
124 | 122 | // setStatus( true ); | |
125 | QString tit = i18n("Connecting to: %1").arg(data()->accname()); | 123 | // emit updateInterface((Interface*) this); |
126 | // con->setCaption(tit); | ||
127 | |||
128 | // con->show(); | ||
129 | |||
130 | 124 | ||
131 | emit begin_connect(); | 125 | emit begin_connect(); |
132 | 126 | ||
133 | qDebug("InterfacePPP::start END"); | 127 | qDebug("InterfacePPP::start END"); |
134 | } | 128 | } |
135 | 129 | ||
136 | void InterfacePPP::stop() | 130 | void InterfacePPP::stop() |
137 | { | 131 | { |
138 | qDebug("InterfacePPP::stop"); | 132 | qDebug("InterfacePPP::stop"); |
139 | 133 | ||
140 | } | 134 | } |
141 | 135 | ||
136 | void InterfacePPP::save() | ||
137 | { | ||
138 | data()->save(); | ||
139 | emit updateInterface((Interface*) this); | ||
140 | } | ||