Diffstat (limited to 'noncore/settings/networksettings/ppp/authwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/ppp/authwidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/authwidget.cpp b/noncore/settings/networksettings/ppp/authwidget.cpp index fa2b164..f3d842f 100644 --- a/noncore/settings/networksettings/ppp/authwidget.cpp +++ b/noncore/settings/networksettings/ppp/authwidget.cpp | |||
@@ -121,58 +121,58 @@ AuthWidget::AuthWidget(PPPData *pd, QWidget *parent, bool isnewaccount, const ch | |||
121 | bool AuthWidget::check() | 121 | bool AuthWidget::check() |
122 | { | 122 | { |
123 | bool ret = true; | 123 | bool ret = true; |
124 | if (scriptWidget){ | 124 | if (scriptWidget){ |
125 | if (!scriptWidget->check()){ | 125 | if (!scriptWidget->check()){ |
126 | QMessageBox::critical(this, tr("error"), tr("<qt>Login script has unbalanced loop Start/End<qt>")); | 126 | QMessageBox::critical(this, tr("error"), tr("<qt>Login script has unbalanced loop Start/End<qt>")); |
127 | ret = false; | 127 | ret = false; |
128 | } | 128 | } |
129 | } | 129 | } |
130 | return ret; | 130 | return ret; |
131 | } | 131 | } |
132 | 132 | ||
133 | void AuthWidget::save() | 133 | void AuthWidget::save() |
134 | { | 134 | { |
135 | _pppdata->setAuthMethod(auth->currentItem()); | 135 | _pppdata->setAuthMethod(auth->currentItem()); |
136 | if (scriptWidget) scriptWidget->save(); | 136 | if (scriptWidget) scriptWidget->save(); |
137 | _pppdata->setStoredUsername( userName->text() ); | 137 | _pppdata->setStoredUsername( userName->text() ); |
138 | _pppdata->setStorePassword(store_password->isChecked()); | 138 | _pppdata->setStorePassword(store_password->isChecked()); |
139 | if (store_password->isChecked()) | 139 | if (store_password->isChecked()) |
140 | _pppdata->setStoredPassword( passWord->text() ); | 140 | _pppdata->setStoredPassword( passWord->text() ); |
141 | } | 141 | } |
142 | 142 | ||
143 | void AuthWidget::authChanged( const QString &authStr ) | 143 | void AuthWidget::authChanged( const QString &authStr ) |
144 | { | 144 | { |
145 | qDebug("AuthWidget::authChanged( %s )", authStr.latin1() ); | 145 | odebug << "AuthWidget::authChanged( " << authStr.latin1() << " )" << oendl; |
146 | if ( authStr.contains( tr("Script-based") ) ){ | 146 | if ( authStr.contains( tr("Script-based") ) ){ |
147 | showUsernamePassword( false ); | 147 | showUsernamePassword( false ); |
148 | showScriptWindow( true ); | 148 | showScriptWindow( true ); |
149 | } else if ( authStr.contains( tr("PAP") ) || | 149 | } else if ( authStr.contains( tr("PAP") ) || |
150 | authStr.contains( tr("CHAP") ) ){ | 150 | authStr.contains( tr("CHAP") ) ){ |
151 | showUsernamePassword( true ); | 151 | showUsernamePassword( true ); |
152 | showScriptWindow( false ); | 152 | showScriptWindow( false ); |
153 | } else { | 153 | } else { |
154 | qDebug("do not really know how to handle"); | 154 | odebug << "do not really know how to handle" << oendl; |
155 | showUsernamePassword( false ); | 155 | showUsernamePassword( false ); |
156 | showScriptWindow( false ); | 156 | showScriptWindow( false ); |
157 | } | 157 | } |
158 | } | 158 | } |
159 | 159 | ||
160 | 160 | ||
161 | void AuthWidget::showUsernamePassword( bool show ) | 161 | void AuthWidget::showUsernamePassword( bool show ) |
162 | { | 162 | { |
163 | if (show){ | 163 | if (show){ |
164 | user_l->show(); | 164 | user_l->show(); |
165 | userName->show(); | 165 | userName->show(); |
166 | pw_l->show(); | 166 | pw_l->show(); |
167 | passWord->show(); | 167 | passWord->show(); |
168 | store_password->show(); | 168 | store_password->show(); |
169 | hidePw->show(); | 169 | hidePw->show(); |
170 | }else{//!show | 170 | }else{//!show |
171 | user_l->hide(); | 171 | user_l->hide(); |
172 | userName->hide(); | 172 | userName->hide(); |
173 | pw_l->hide(); | 173 | pw_l->hide(); |
174 | passWord->hide(); | 174 | passWord->hide(); |
175 | store_password->hide(); | 175 | store_password->hide(); |
176 | hidePw->hide(); | 176 | hidePw->hide(); |
177 | } | 177 | } |
178 | } | 178 | } |