Diffstat (limited to 'libopie2/opiesecurity/multiauthcommon.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiesecurity/multiauthcommon.cpp | 19 |
1 files changed, 11 insertions, 8 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 | |||
@@ -5,4 +5,6 @@ | |||
5 | #include <opie2/odebug.h> | 5 | #include <opie2/odebug.h> |
6 | #include <opie2/oapplication.h> | 6 | #include <opie2/oapplication.h> |
7 | #include <opie2/ocontactaccessbackend_vcard.h> | ||
8 | #include <opie2/ocontactaccess.h> | ||
7 | 9 | ||
8 | /* Qt */ | 10 | /* Qt */ |
@@ -20,5 +22,5 @@ namespace Opie { | |||
20 | namespace Security { | 22 | namespace Security { |
21 | 23 | ||
22 | SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c, | 24 | SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, const QString& c, |
23 | bool modal, bool fullscreen = FALSE ) | 25 | bool modal, bool fullscreen = FALSE ) |
24 | : QDialog( parent, name, modal, | 26 | : QDialog( parent, name, modal, |
@@ -32,5 +34,5 @@ SecOwnerDlg::SecOwnerDlg( QWidget *parent, const char * name, Contact c, | |||
32 | // set up contents. | 34 | // set up contents. |
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); |
36 | tv->setText(text); | 38 | tv->setText(text); |
@@ -64,9 +66,10 @@ int runPlugins() { | |||
64 | QString vfilename = Global::applicationFileName("addressbook", | 66 | QString vfilename = Global::applicationFileName("addressbook", |
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 | } |
72 | 75 | ||
@@ -187,5 +190,5 @@ int runPlugins() { | |||
187 | } // end if plugin recognized | 190 | } // end if plugin recognized |
188 | } //end for | 191 | } //end for |
189 | if(oi) delete oi; | 192 | delete oi; |
190 | return 1; | 193 | return 1; |
191 | } | 194 | } |