Diffstat (limited to 'core/settings/security/security.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/security/security.cpp | 8 |
1 files changed, 7 insertions, 1 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 | |||
@@ -10,37 +10,43 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "security.h" | 20 | #include "security.h" |
21 | 21 | ||
22 | /* OPIE */ | ||
22 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
24 | #include <qpe/password.h> | 25 | #include <qpe/password.h> |
25 | #include <qpe/qpedialog.h> | 26 | #include <qpe/qpedialog.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 27 | #include <qpe/qcopenvelope_qws.h> |
28 | #include <opie2/odebug.h> | ||
27 | 29 | ||
30 | /* QT */ | ||
28 | #include <qcheckbox.h> | 31 | #include <qcheckbox.h> |
29 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
30 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
31 | #include <qmessagebox.h> | 34 | #include <qmessagebox.h> |
32 | #include <qfile.h> | 35 | #include <qfile.h> |
33 | #include <qtextstream.h> | 36 | #include <qtextstream.h> |
34 | 37 | ||
38 | |||
39 | using namespace Opie::Core; | ||
40 | |||
35 | Security::Security( QWidget* parent, const char* name, WFlags fl ) | 41 | Security::Security( QWidget* parent, const char* name, WFlags fl ) |
36 | : SecurityBase( parent, name, TRUE, WStyle_ContextHelp ) | 42 | : SecurityBase( parent, name, TRUE, WStyle_ContextHelp ) |
37 | { | 43 | { |
38 | valid=FALSE; | 44 | valid=FALSE; |
39 | Config cfg("Security"); | 45 | Config cfg("Security"); |
40 | cfg.setGroup("Passcode"); | 46 | cfg.setGroup("Passcode"); |
41 | passcode = cfg.readEntry("passcode"); | 47 | passcode = cfg.readEntry("passcode"); |
42 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); | 48 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); |
43 | cfg.setGroup("Sync"); | 49 | cfg.setGroup("Sync"); |
44 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 | 50 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 |
45 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); | 51 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); |
46 | selectNet(auth_peer,auth_peer_bits,TRUE); | 52 | selectNet(auth_peer,auth_peer_bits,TRUE); |
@@ -248,25 +254,25 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) | |||
248 | } | 254 | } |
249 | } | 255 | } |
250 | } | 256 | } |
251 | } | 257 | } |
252 | } | 258 | } |
253 | 259 | ||
254 | for (int i=0; i<syncnet->count(); i++) { | 260 | for (int i=0; i<syncnet->count(); i++) { |
255 | if ( syncnet->text(i).left(sn.length()) == sn ) { | 261 | if ( syncnet->text(i).left(sn.length()) == sn ) { |
256 | syncnet->setCurrentItem(i); | 262 | syncnet->setCurrentItem(i); |
257 | return; | 263 | return; |
258 | } | 264 | } |
259 | } | 265 | } |
260 | qDebug("No match for \"%s\"",sn.latin1()); | 266 | odebug << "No match for \"" << sn << "\"" << oendl; |
261 | } | 267 | } |
262 | 268 | ||
263 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) | 269 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) |
264 | { | 270 | { |
265 | auth_peer=0; | 271 | auth_peer=0; |
266 | if ( sn == tr("Any") ) { | 272 | if ( sn == tr("Any") ) { |
267 | auth_peer = 0; | 273 | auth_peer = 0; |
268 | auth_peer_bits = 0; | 274 | auth_peer_bits = 0; |
269 | } else if ( sn == tr("None") ) { | 275 | } else if ( sn == tr("None") ) { |
270 | auth_peer = 0; | 276 | auth_peer = 0; |
271 | auth_peer_bits = 32; | 277 | auth_peer_bits = 32; |
272 | } else { | 278 | } else { |