summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/today.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp
index 67b23e1..450ecb7 100644
--- a/core/pim/today/today.cpp
+++ b/core/pim/today/today.cpp
@@ -34,2 +34,5 @@
#include <opie2/opluginloader.h>
+#include <opie2/opimcontact.h>
+#include <opie2/ocontactaccessbackend_vcard.h>
+#include <opie2/ocontactaccess.h>
#include <opie2/oconfig.h>
@@ -39,3 +42,2 @@
#include <qpe/qpeapplication.h>
-#include <qpe/contact.h>
@@ -134,5 +136,7 @@ void Today::setRefreshTimer( int interval ) {
void Today::setOwnerField() {
- QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" );
- if ( QFile::exists( file ) ) {
- Contact cont = Contact::readVCard( file )[0];
+ QString vfilename = Global::applicationFileName("addressbook", "businesscard.vcf");
+ Opie::OPimContactAccess acc( "today", vfilename,
+ new Opie::OPimContactAccessBackend_VCard("today", vfilename ) );
+ if ( acc.load() ) {
+ Opie::OPimContact cont = acc.allRecords()[0];
QString returnString = cont.fullName();