summaryrefslogtreecommitdiff
Unidiff
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
@@ -32,12 +32,14 @@
32 32
33#include <opie2/odebug.h> 33#include <opie2/odebug.h>
34#include <opie2/opluginloader.h> 34#include <opie2/opluginloader.h>
35#include <opie2/opimcontact.h>
36#include <opie2/ocontactaccessbackend_vcard.h>
37#include <opie2/ocontactaccess.h>
35#include <opie2/oconfig.h> 38#include <opie2/oconfig.h>
36#include <opie2/oresource.h> 39#include <opie2/oresource.h>
37 40
38#include <qpe/qcopenvelope_qws.h> 41#include <qpe/qcopenvelope_qws.h>
39#include <qpe/qpeapplication.h> 42#include <qpe/qpeapplication.h>
40#include <qpe/contact.h>
41 43
42#include <qdir.h> 44#include <qdir.h>
43#include <qtimer.h> 45#include <qtimer.h>
@@ -132,9 +134,11 @@ void Today::setRefreshTimer( int interval ) {
132 * Initialises the owner field with the default value, the username 134 * Initialises the owner field with the default value, the username
133 */ 135 */
134void Today::setOwnerField() { 136void Today::setOwnerField() {
135 QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" ); 137 QString vfilename = Global::applicationFileName("addressbook", "businesscard.vcf");
136 if ( QFile::exists( file ) ) { 138 Opie::OPimContactAccess acc( "today", vfilename,
137 Contact cont = Contact::readVCard( file )[0]; 139 new Opie::OPimContactAccessBackend_VCard("today", vfilename ) );
140 if ( acc.load() ) {
141 Opie::OPimContact cont = acc.allRecords()[0];
138 QString returnString = cont.fullName(); 142 QString returnString = cont.fullName();
139 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); 143 OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" );
140 } else { 144 } else {