summaryrefslogtreecommitdiff
authorzecke <zecke>2005-01-22 11:30:46 (UTC)
committer zecke <zecke>2005-01-22 11:30:46 (UTC)
commit8a0b6e6d1d5043466c4211b2d89da562ab9fd91c (patch) (unidiff)
tree7be6947fe33013cb35b85e4fff6e0093b3557dab
parent55eccecc08f839878e5743d6e6be25af386b5a3f (diff)
downloadopie-8a0b6e6d1d5043466c4211b2d89da562ab9fd91c.zip
opie-8a0b6e6d1d5043466c4211b2d89da562ab9fd91c.tar.gz
opie-8a0b6e6d1d5043466c4211b2d89da562ab9fd91c.tar.bz2
-Fix for #1533
Use OPimContactAccess to load the Owner Information. This should fix the displaying of the contact for non latin1 encoded users. To use OPimContactAccess OpieSecurity now depends on opiepim2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiesecurity/multiauthcommon.cpp19
-rw-r--r--libopie2/opiesecurity/multiauthcommon.h3
-rw-r--r--libopie2/opiesecurity/opiesecurity.pro1
3 files changed, 13 insertions, 10 deletions
diff --git a/libopie2/opiesecurity/multiauthcommon.cpp b/libopie2/opiesecurity/multiauthcommon.cpp
index e563193..2760760 100644
--- a/libopie2/opiesecurity/multiauthcommon.cpp
+++ b/libopie2/opiesecurity/multiauthcommon.cpp
@@ -6,2 +6,4 @@
6#include <opie2/oapplication.h> 6#include <opie2/oapplication.h>
7#include <opie2/ocontactaccessbackend_vcard.h>
8#include <opie2/ocontactaccess.h>
7 9
@@ -21,3 +23,3 @@ namespace Security {
21 23
22SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c, 24SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, const QString& c,
23 bool modal, bool fullscreen = FALSE ) 25 bool modal, bool fullscreen = FALSE )
@@ -33,3 +35,3 @@ SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c,
33 QString text("<H3>" + tr("Please contact the owner (directions follow), or try again clicking of this screen (and waiting for the penalty time) if you are the legitimate owner") + "</H3>"); 35 QString text("<H3>" + tr("Please contact the owner (directions follow), or try again clicking of this screen (and waiting for the penalty time) if you are the legitimate owner") + "</H3>");
34 text += c.toRichText(); 36 text += c;
35 tv = new QTextView(this); 37 tv = new QTextView(this);
@@ -65,7 +67,8 @@ int runPlugins() {
65 "businesscard.vcf"); 67 "businesscard.vcf");
66 if (QFile::exists(vfilename)) { 68 Opie::OPimContactAccess acc( "multiauth", vfilename,
67 Contact c; 69 new Opie::OPimContactAccessBackend_VCard( "multiauth", vfilename ) );
68 c = Contact::readVCard( vfilename )[0]; 70 if ( acc.load() ) {
69 71 Opie::OPimContact contact = acc.allRecords()[0];
70 oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE); 72 if ( !contact.isEmpty() )
73 oi = new SecOwnerDlg(0, 0, contact.toRichText(), TRUE, TRUE);
71 } 74 }
@@ -188,3 +191,3 @@ int runPlugins() {
188 } //end for 191 } //end for
189 if(oi) delete oi; 192 delete oi;
190 return 1; 193 return 1;
diff --git a/libopie2/opiesecurity/multiauthcommon.h b/libopie2/opiesecurity/multiauthcommon.h
index b728dae..42dff17 100644
--- a/libopie2/opiesecurity/multiauthcommon.h
+++ b/libopie2/opiesecurity/multiauthcommon.h
@@ -43,3 +43,2 @@
43 43
44
45namespace Opie { 44namespace Opie {
@@ -53,3 +52,3 @@ class SecOwnerDlg : public QDialog
53 52
54 SecOwnerDlg( QWidget *parent, const char * name, Contact c, 53 SecOwnerDlg( QWidget *parent, const char * name, const QString& owner,
55 bool modal, bool fullscreen); 54 bool modal, bool fullscreen);
diff --git a/libopie2/opiesecurity/opiesecurity.pro b/libopie2/opiesecurity/opiesecurity.pro
index 7171e67..d4d7925 100644
--- a/libopie2/opiesecurity/opiesecurity.pro
+++ b/libopie2/opiesecurity/opiesecurity.pro
@@ -15,2 +15,3 @@ INCLUDEPATH += $(OPIEDIR)/include
15DEPENDPATH += $(OPIEDIR)/include 15DEPENDPATH += $(OPIEDIR)/include
16LIBS += -lopiepim2
16 17