Diffstat (limited to 'core/settings/security/security.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/security/security.cpp | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index 4eddb55..b917aea 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp @@ -21,2 +21,3 @@ +/* OPIE */ #include <qpe/qpeapplication.h> @@ -26,3 +27,5 @@ #include <qpe/qcopenvelope_qws.h> +#include <opie2/odebug.h> +/* QT */ #include <qcheckbox.h> @@ -34,2 +37,5 @@ + +using namespace Opie::Core; + Security::Security( QWidget* parent, const char* name, WFlags fl ) @@ -120,3 +126,3 @@ void Security::restoreDefaults() tr("Attention"), - tr( "<p>All user-defined net ranges will be lost."), + tr( "<p>All user-defined net ranges will be lost."), QMessageBox::Warning, @@ -172,12 +178,12 @@ void Security::show() } else { - if (!valid) // security passcode was not asked yet, so ask now - { - QString pc = enterPassCode(tr("Enter passcode")); - if ( pc != passcode ) { - QMessageBox::critical(this, tr("Passcode incorrect"), - tr("The passcode entered is incorrect.\nAccess denied")); - reject(); - return; - } - } + if (!valid) // security passcode was not asked yet, so ask now + { + QString pc = enterPassCode(tr("Enter passcode")); + if ( pc != passcode ) { + QMessageBox::critical(this, tr("Passcode incorrect"), + tr("The passcode entered is incorrect.\nAccess denied")); + reject(); + return; + } + } } @@ -218,13 +224,13 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) if (update) { - //User selected/active netrange first - syncnet->insertItem( tr( sn ) ); + //User selected/active netrange first + syncnet->insertItem( tr( sn ) ); - Config cfg("Security"); - cfg.setGroup("Sync"); + Config cfg("Security"); + cfg.setGroup("Sync"); - //set up defaults if needed, if someone manually deletes net0 he'll get a suprise hehe - QString test = cfg.readEntry("net0",""); - if (test.isEmpty()) { + //set up defaults if needed, if someone manually deletes net0 he'll get a suprise hehe + QString test = cfg.readEntry("net0",""); + if (test.isEmpty()) { insertDefaultRanges(); - } else { + } else { // 10 ought to be enough for everybody... :) @@ -259,3 +265,3 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) } - qDebug("No match for \"%s\"",sn.latin1()); + odebug << "No match for \"" << sn << "\"" << oendl; } @@ -342,8 +348,8 @@ void Security::applySecurity() - //write back all other net ranges in *cleartext* - for (int i=0; i<10; i++) { - QString target; - target.sprintf("net%d", i); - cfg.writeEntry(target,syncnet->text(i)); - } + //write back all other net ranges in *cleartext* + for (int i=0; i<10; i++) { + QString target; + target.sprintf("net%d", i); + cfg.writeEntry(target,syncnet->text(i)); + } |