summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/kvncbookmarkdlg.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/comm/keypebble/kvncbookmarkdlg.cpp b/noncore/comm/keypebble/kvncbookmarkdlg.cpp
index 1e2f3c3..8556d49 100644
--- a/noncore/comm/keypebble/kvncbookmarkdlg.cpp
+++ b/noncore/comm/keypebble/kvncbookmarkdlg.cpp
@@ -1,85 +1,85 @@
1#include <qframe.h> 1#include <qframe.h>
2#include <qvbox.h> 2#include <qvbox.h>
3#include <qcheckbox.h> 3#include <qcheckbox.h>
4#include <qspinbox.h> 4#include <qspinbox.h>
5#include <qlabel.h> 5#include <qlabel.h>
6#include <qlayout.h> 6#include <qlayout.h>
7#include <qwhatsthis.h> 7#include <qwhatsthis.h>
8#include <qfile.h> 8#include <qfile.h>
9#include <qdir.h> 9#include <qdir.h>
10#include <qstring.h> 10#include <qstring.h>
11#include <qapplication.h> 11#include <qapplication.h>
12#include <qlineedit.h> 12#include <qlineedit.h>
13#include <qtextstream.h> 13#include <qtextstream.h>
14#include <qpushbutton.h> 14#include <qpushbutton.h>
15#include <qlistbox.h> 15#include <qlistbox.h>
16#include <qpe/config.h> 16#include <qpe/config.h>
17#include <qpe/global.h> 17#include <qpe/global.h>
18#include "krfbserver.h" 18#include "krfbserver.h"
19#include "kvncbookmarkdlg.h" 19#include "kvncbookmarkdlg.h"
20 20
21KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent=0, const char * name=0, WFlags f=0 ) 21KVNCBookmarkDlg::KVNCBookmarkDlg( QWidget * parent, const char * name, WFlags f )
22 22
23: KVNCBookmarkDlgBase( parent, name,f) 23: KVNCBookmarkDlgBase( parent, name,f)
24{ 24{
25 readBookmarks(); 25 readBookmarks();
26 refresh(); 26 refresh();
27 27
28} 28}
29 29
30KVNCBookmarkDlg::~KVNCBookmarkDlg() 30KVNCBookmarkDlg::~KVNCBookmarkDlg()
31{ 31{
32} 32}
33 33
34void KVNCBookmarkDlg::addBookmark(KRFBServer * server) 34void KVNCBookmarkDlg::addBookmark(KRFBServer * server)
35{ 35{
36 if (server) { 36 if (server) {
37 servers.append(server); 37 servers.append(server);
38 bookmarkList->insertItem(server->name); 38 bookmarkList->insertItem(server->name);
39 writeBookmarks(); 39 writeBookmarks();
40 refresh(); 40 refresh();
41 } 41 }
42} 42}
43 43
44void KVNCBookmarkDlg::deleteBookmark(QString name) 44void KVNCBookmarkDlg::deleteBookmark(QString name)
45{ 45{
46 KRFBServer * server=0; 46 KRFBServer * server=0;
47 for ( server=servers.first(); server != 0; server=servers.next() ) { 47 for ( server=servers.first(); server != 0; server=servers.next() ) {
48 if (server->name==name) { 48 if (server->name==name) {
49 servers.remove(servers.at()); 49 servers.remove(servers.at());
50 writeBookmarks(); 50 writeBookmarks();
51 refresh(); 51 refresh();
52 return; 52 return;
53 } 53 }
54 } 54 }
55} 55}
56KRFBServer *KVNCBookmarkDlg::getServer(QString name) 56KRFBServer *KVNCBookmarkDlg::getServer(QString name)
57{ 57{
58 KRFBServer * server=0; 58 KRFBServer * server=0;
59 for ( server=servers.first(); server != 0; server=servers.next() ) { 59 for ( server=servers.first(); server != 0; server=servers.next() ) {
60 if (server->name==name) 60 if (server->name==name)
61 61
62 return server; 62 return server;
63 } 63 }
64 return 0; 64 return 0;
65} 65}
66 66
67 67
68/* 68/*
69 Note that the degree of protection offered by the encryption here is 69 Note that the degree of protection offered by the encryption here is
70 only sufficient to avoid the most casual observation of the configuration 70 only sufficient to avoid the most casual observation of the configuration
71 files. People with access to the files can write down the contents and 71 files. People with access to the files can write down the contents and
72 decrypt it using this source code. 72 decrypt it using this source code.
73 73
74 Conceivably, and at some burden to the user, this encryption could 74 Conceivably, and at some burden to the user, this encryption could
75 be improved. 75 be improved.
76*/ 76*/
77QString KVNCBookmarkDlg::encipher(const QString& plain) 77QString KVNCBookmarkDlg::encipher(const QString& plain)
78{ 78{
79 // mainly, we make it long 79 // mainly, we make it long
80 QString cipher; 80 QString cipher;
81 int mix=28730492; 81 int mix=28730492;
82 for (int i=0; i<(int)plain.length(); i++) { 82 for (int i=0; i<(int)plain.length(); i++) {
83 int u = plain[i].unicode(); 83 int u = plain[i].unicode();
84 int c = u ^ mix; 84 int c = u ^ mix;
85 QString x = QString::number(c,36); 85 QString x = QString::number(c,36);