summaryrefslogtreecommitdiff
path: root/libopie2/opiesecurity
Side-by-side diff
Diffstat (limited to 'libopie2/opiesecurity') (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 @@
#include <opie2/oapplication.h>
+#include <opie2/ocontactaccessbackend_vcard.h>
+#include <opie2/ocontactaccess.h>
@@ -21,3 +23,3 @@ namespace Security {
-SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c,
+SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, const QString& c,
bool modal, bool fullscreen = FALSE )
@@ -33,3 +35,3 @@ SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c,
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>");
- text += c.toRichText();
+ text += c;
tv = new QTextView(this);
@@ -65,7 +67,8 @@ int runPlugins() {
"businesscard.vcf");
- if (QFile::exists(vfilename)) {
- Contact c;
- c = Contact::readVCard( vfilename )[0];
-
- oi = new SecOwnerDlg(0, 0, c, TRUE, TRUE);
+ Opie::OPimContactAccess acc( "multiauth", vfilename,
+ new Opie::OPimContactAccessBackend_VCard( "multiauth", vfilename ) );
+ if ( acc.load() ) {
+ Opie::OPimContact contact = acc.allRecords()[0];
+ if ( !contact.isEmpty() )
+ oi = new SecOwnerDlg(0, 0, contact.toRichText(), TRUE, TRUE);
}
@@ -188,3 +191,3 @@ int runPlugins() {
} //end for
- if(oi) delete oi;
+ delete oi;
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 @@
-
namespace Opie {
@@ -53,3 +52,3 @@ class SecOwnerDlg : public QDialog
- SecOwnerDlg( QWidget *parent, const char * name, Contact c,
+ SecOwnerDlg( QWidget *parent, const char * name, const QString& owner,
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
DEPENDPATH += $(OPIEDIR)/include
+LIBS += -lopiepim2