summaryrefslogtreecommitdiffabout
path: root/kabc/field.cpp
Side-by-side diff
Diffstat (limited to 'kabc/field.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/field.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 7c6d7a9..203f696 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -30,12 +30,14 @@ $Id$
#include <kconfig.h>
#include <kconfigbase.h>
#include <kglobal.h>
#include "field.h"
#include "resource.h"
+//Added by qt3to4:
+#include <Q3ValueList>
using namespace KABC;
class Field::FieldImpl
{
public:
@@ -374,13 +376,13 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
case FieldImpl::Birthday:
//US
//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
{
QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
- a.setBirthday(dt);
+ a.setBirthday((QDateTime)dt);
}
return true;
case FieldImpl::CustomField:
a.insertCustom( mImpl->app(), mImpl->key(), value );
//US never copy the resourcename back to the adressee.
case FieldImpl::Resource:
@@ -490,13 +492,13 @@ void Field::saveFields( const QString &identifier,
saveFields( cfg, identifier, fields );
}
void Field::saveFields( KConfig *cfg, const QString &identifier,
const Field::List &fields )
{
- QValueList<int> fieldIds;
+ Q3ValueList<int> fieldIds;
//US
// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
int custom = 0;
Field::List::ConstIterator it;
@@ -530,20 +532,20 @@ Field::List Field::restoreFields( const QString &identifier )
return l;
}
Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
{
- QValueList<int> fieldIds = cfg->readIntListEntry( identifier);
+ Q3ValueList<int> fieldIds = cfg->readIntListEntry( identifier);
//US
// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1());
Field::List fields;
int custom = 0;
- QValueList<int>::ConstIterator it;
+ Q3ValueList<int>::ConstIterator it;
for( it = fieldIds.begin(); it != fieldIds.end(); ++it ) {
FieldImpl *f = 0;
if ( (*it) == FieldImpl::CustomField ) {
QStringList customEntry = cfg->readListEntry( "KABC_CustomEntry_" +
identifier + "_" +
QString::number( custom++ ) );