From a210b9a597ba0c929d95c38ffbaf972916c7b8a7 Mon Sep 17 00:00:00 2001 From: ar Date: Sun, 02 May 2004 17:31:50 +0000 Subject: - convert qDebug to odebug --- (limited to 'core/settings/security/security.cpp') 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 @@ -19,12 +19,15 @@ **********************************************************************/ #include "security.h" +/* OPIE */ #include #include #include #include #include +#include +/* QT */ #include #include #include @@ -32,6 +35,9 @@ #include #include + +using namespace Opie::Core; + Security::Security( QWidget* parent, const char* name, WFlags fl ) : SecurityBase( parent, name, TRUE, WStyle_ContextHelp ) { @@ -118,7 +124,7 @@ void Security::restoreDefaults() { QMessageBox unrecbox( tr("Attention"), - tr( "

All user-defined net ranges will be lost."), + tr( "

All user-defined net ranges will be lost."), QMessageBox::Warning, QMessageBox::Cancel, QMessageBox::Yes, QMessageBox::NoButton, 0, QString::null, TRUE, WStyle_StaysOnTop); @@ -170,16 +176,16 @@ void Security::show() //if ( passcode.isEmpty() ) //reject(); } 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; + } + } } setEnabled(TRUE); valid=TRUE; @@ -216,17 +222,17 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) //insert user-defined list of netranges upon start 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... :) // If you need more, don't forget to edit applySecurity() as well bool already_there=FALSE; @@ -257,7 +263,7 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) return; } } - qDebug("No match for \"%s\"",sn.latin1()); + odebug << "No match for \"" << sn << "\"" << oendl; } void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) @@ -340,12 +346,12 @@ void Security::applySecurity() cfg.writeEntry("auth_peer",auth_peer); cfg.writeEntry("auth_peer_bits",auth_peer_bits); - //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)); + } #ifdef ODP #error "Use 0,1,2 and use Launcher" -- cgit v0.9.0.2