author | ar <ar> | 2004-05-02 17:31:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 17:31:50 (UTC) |
commit | a210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (side-by-side diff) | |
tree | ce121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings/security | |
parent | 18759e9156c96795831120408a9da0d3b4ec71a4 (diff) | |
download | opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2 |
- convert qDebug to odebug
-rw-r--r-- | core/settings/security/security.cpp | 58 | ||||
-rw-r--r-- | core/settings/security/security.pro | 14 |
2 files changed, 39 insertions, 33 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 @@ -19,12 +19,15 @@ **********************************************************************/ #include "security.h" +/* OPIE */ #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/password.h> #include <qpe/qpedialog.h> #include <qpe/qcopenvelope_qws.h> +#include <opie2/odebug.h> +/* QT */ #include <qcheckbox.h> #include <qpushbutton.h> #include <qcombobox.h> @@ -32,6 +35,9 @@ #include <qfile.h> #include <qtextstream.h> + +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( "<p>All user-defined net ranges will be lost."), + tr( "<p>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" diff --git a/core/settings/security/security.pro b/core/settings/security/security.pro index 4a29ee2..4c1e68b 100644 --- a/core/settings/security/security.pro +++ b/core/settings/security/security.pro @@ -1,10 +1,10 @@ -CONFIG += qt warn_on quick-app -HEADERS = security.h -SOURCES = security.cpp main.cpp -INTERFACES = securitybase.ui +CONFIG += qt warn_on quick-app +HEADERS = security.h +SOURCES = security.cpp main.cpp +INTERFACES = securitybase.ui INCLUDEPATH += $(OPIEDIR)/include -DEPENDPATH += ../$(OPIEDIR)/include -LIBS += -lqpe -TARGET = security +DEPENDPATH += ../$(OPIEDIR)/include +LIBS += -lqpe -lopiecore2 +TARGET = security include ( $(OPIEDIR)/include.pro ) |