Diffstat (limited to 'noncore/settings/networksettings/ppp/interfaceppp.cpp') (more/less context) (ignore 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() return false; } void InterfacePPP::start() { qDebug("InterfacePPP::start"); - if (data()->storedPassword() != "" ){ - data()->setPassword(data()->storedPassword()); - }else{ - //FIXME: + if (data()->password().isEmpty() ){ +//FIXME: ask for password qDebug("using dummy password"); - data()->setPassword( "dummy" ); + QMessageBox::critical( 0, "no password", "you should be prompted for a password, but you are not! ;-)"); } QFileInfo info(pppdPath()); if(!info.exists()){ @@ -93,13 +91,13 @@ void InterfacePPP::start() // if this is a PAP or CHAP account, ensure that username is // supplied if(data()->authMethod() == AUTH_PAP || data()->authMethod() == AUTH_CHAP || data()->authMethod() == AUTH_PAPCHAP ) { - if(false){ //ID_Edit->text().isEmpty()) { + if(false){ //FIXME: ID_Edit->text().isEmpty()) { QMessageBox::warning(0,tr("Error"), i18n("<qt>You have selected the authentication method PAP or CHAP. This requires that you supply a username and a password!</qt>")); // FIXME: return; } else { if(!modem()->setSecret(data()->authMethod(), PPPData::encodeWord(data()->storedUsername()), @@ -117,25 +115,26 @@ void InterfacePPP::start() if (data()->phonenumber().isEmpty()) { QString s = i18n("You must specify a telephone number!"); QMessageBox::warning(0, tr("Error"), s); return; } -// this->hide(); - - QString tit = i18n("Connecting to: %1").arg(data()->accname()); -// con->setCaption(tit); - -// con->show(); - + // SEGFAULTS: +// setStatus( true ); +// emit updateInterface((Interface*) this); emit begin_connect(); qDebug("InterfacePPP::start END"); } void InterfacePPP::stop() { qDebug("InterfacePPP::stop"); } +void InterfacePPP::save() +{ + data()->save(); + emit updateInterface((Interface*) this); +} |