author | gints <gints> | 2005-05-13 17:30:15 (UTC) |
---|---|---|
committer | gints <gints> | 2005-05-13 17:30:15 (UTC) |
commit | 4451abf402aa1dd967ef8b70a7eba1192f13afb0 (patch) (side-by-side diff) | |
tree | 985405c7a3fe121103114eaebf3f87603894672d | |
parent | b010c50f099d197c0a89755eeef4dc1e40559a83 (diff) | |
download | opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.zip opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.tar.gz opie-4451abf402aa1dd967ef8b70a7eba1192f13afb0.tar.bz2 |
Remove latinism in today owner information - bug 1655
-rw-r--r-- | core/pim/today/today.cpp | 12 |
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 @@ -29,18 +29,20 @@ */ #include "today.h" #include <opie2/odebug.h> #include <opie2/opluginloader.h> +#include <opie2/opimcontact.h> +#include <opie2/ocontactaccessbackend_vcard.h> +#include <opie2/ocontactaccess.h> #include <opie2/oconfig.h> #include <opie2/oresource.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> -#include <qpe/contact.h> #include <qdir.h> #include <qtimer.h> #include <qwhatsthis.h> #include <qmessagebox.h> @@ -129,15 +131,17 @@ void Today::setRefreshTimer( int interval ) { /** * Initialises the owner field with the default value, the username */ 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(); OwnerField->setText( "<b>" + tr ( "Owned by " ) + returnString + "</b>" ); } else { OwnerField->setText( "<b>" + tr ( "Please fill out the business card" ) + " </b>" ); } } |