summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp5
-rw-r--r--core/pim/addressbook/contacteditor.cpp34
2 files changed, 20 insertions, 19 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 4feadeb..5222f16 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -26,2 +26,3 @@
#include <qpe/qcopenvelope_qws.h>
+#include <qpe/timestring.h>
@@ -452,6 +453,6 @@ QString AbTable::findContactContact( const OContact &entry, int /* row */ )
case Qtopia::Birthday:
- value = entry.birthday();
+ value = TimeString::numberDateString( entry.birthday() );
break;
case Qtopia::Anniversary:
- value = entry.anniversary();
+ value = TimeString::numberDateString( entry.anniversary() );
break;
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp
index 52ab0f2..e034b35 100644
--- a/core/pim/addressbook/contacteditor.cpp
+++ b/core/pim/addressbook/contacteditor.cpp
@@ -2,2 +2,3 @@
* Copyright (c) 2002 Michael R. Crawford <mike@tuxnami.org>
+ * Copyright (C) 2002 by Stefan Eilers (eilers.stefan@epost.de)
*
@@ -1110,16 +1111,2 @@ void ContactEditor::loadFields() {
}
- // Set DatePicker
- qWarning ("**Info: %s", ent.birthday().latin1() );
- if ( !ent.birthday().isEmpty() ){
- birthdayButton->setText( ent.birthday() );
- birthdayPicker->setDate( TimeConversion::fromString ( ent.birthday() ) );
- } else
- birthdayButton->setText( tr ("Unknown") );
-
- qWarning ("**Info: %s", ent.anniversary().latin1() );
- if ( !ent.anniversary().isEmpty() ){
- anniversaryButton->setText( ent.anniversary() );
- anniversaryPicker->setDate( TimeConversion::fromString ( ent.birthday() ) );
- } else
- anniversaryButton->setText( tr ("Unknown") );
@@ -1603,3 +1590,16 @@ void ContactEditor::setEntry( const OContact &entry ) {
- loadFields();
+ // loadFields(); :SX
+
+ // Set DatePicker
+ if ( !ent.birthday().isNull() ){
+ birthdayButton->setText( TimeString::numberDateString( ent.birthday() ) );
+ birthdayPicker->setDate( ent.birthday() );
+ } else
+ birthdayButton->setText( tr ("Unknown") );
+
+ if ( !ent.anniversary().isNull() ){
+ anniversaryButton->setText( TimeString::numberDateString( ent.anniversary() ) );
+ anniversaryPicker->setDate( ent.anniversary() );
+ } else
+ anniversaryButton->setText( tr ("Unknown") );
@@ -1893,3 +1893,3 @@ void ContactEditor::slotAnniversaryDateChanged( int year, int month, int day)
anniversaryButton->setText( dateString );
- ent.setAnniversary ( dateString );
+ ent.setAnniversary ( date );
}
@@ -1902,3 +1902,3 @@ void ContactEditor::slotBirthdayDateChanged( int year, int month, int day)
birthdayButton->setText( dateString );
- ent.setBirthday ( dateString );
+ ent.setBirthday ( date );
}