summaryrefslogtreecommitdiff
path: root/core/settings/security/security.cpp
Unidiff
Diffstat (limited to 'core/settings/security/security.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/security/security.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp
index 42a39c2..81363d2 100644
--- a/core/settings/security/security.cpp
+++ b/core/settings/security/security.cpp
@@ -115,17 +115,16 @@ void Security::show()
115 setEnabled(FALSE); 115 setEnabled(FALSE);
116 SecurityBase::show(); 116 SecurityBase::show();
117 if ( passcode.isEmpty() ) { 117 if ( passcode.isEmpty() ) {
118 // could insist... 118 // could insist...
119 //changePassCode(); 119 //changePassCode();
120 //if ( passcode.isEmpty() ) 120 //if ( passcode.isEmpty() )
121 //reject(); 121 //reject();
122 } else { 122 } else {
123
124 if (!valid) // security passcode was not asked yet, so ask now 123 if (!valid) // security passcode was not asked yet, so ask now
125 { 124 {
126 QString pc = enterPassCode(tr("Enter passcode")); 125 QString pc = enterPassCode(tr("Enter passcode"));
127 if ( pc != passcode ) { 126 if ( pc != passcode ) {
128 QMessageBox::critical(this, tr("Passcode incorrect"), 127 QMessageBox::critical(this, tr("Passcode incorrect"),
129 tr("The passcode entered is incorrect.\nAccess denied")); 128 tr("The passcode entered is incorrect.\nAccess denied"));
130 reject(); 129 reject();
131 return; 130 return;
@@ -234,17 +233,16 @@ void Security::setSyncNet(const QString& sn)
234 int auth_peer,auth_peer_bits; 233 int auth_peer,auth_peer_bits;
235 parseNet(sn,auth_peer,auth_peer_bits); 234 parseNet(sn,auth_peer,auth_peer_bits);
236 selectNet(auth_peer,auth_peer_bits); 235 selectNet(auth_peer,auth_peer_bits);
237} 236}
238 237
239void Security::applySecurity() 238void Security::applySecurity()
240{ 239{
241 if ( valid ) { 240 if ( valid ) {
242
243 Config cfg("Security"); 241 Config cfg("Security");
244 cfg.setGroup("Passcode"); 242 cfg.setGroup("Passcode");
245 cfg.writeEntry("passcode",passcode); 243 cfg.writeEntry("passcode",passcode);
246 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked()); 244 cfg.writeEntry("passcode_poweron",passcode_poweron->isChecked());
247 cfg.setGroup("Sync"); 245 cfg.setGroup("Sync");
248 int auth_peer=0; 246 int auth_peer=0;
249 int auth_peer_bits; 247 int auth_peer_bits;
250 QString sn = syncnet->currentText(); 248 QString sn = syncnet->currentText();
@@ -265,19 +263,16 @@ void Security::applySecurity()
265 loginCfg.setGroup("General"); 263 loginCfg.setGroup("General");
266 264
267 if (autoLogin) { 265 if (autoLogin) {
268 loginCfg.writeEntry("AutoLogin",autoLoginName); 266 loginCfg.writeEntry("AutoLogin",autoLoginName);
269 } else { 267 } else {
270 loginCfg.removeEntry("AutoLogin"); 268 loginCfg.removeEntry("AutoLogin");
271 } 269 }
272 270
273 cfg.setGroup("SyncMode");
274 cfg.writeEntry("Mode", syncModeCombo->currentItem()+1 );
275
276 } 271 }
277} 272}
278 273
279void Security::changeLoginName( int idx ) 274void Security::changeLoginName( int idx )
280{ 275{
281 autoLoginName = userlist->text(idx);; 276 autoLoginName = userlist->text(idx);;
282 updateGUI(); 277 updateGUI();
283} 278}