summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressee.cpp6
-rw-r--r--kabc/addressee.h6
-rw-r--r--kabc/field.cpp24
3 files changed, 32 insertions, 4 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 5cb194a..d484073 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -1509,2 +1509,8 @@ Resource *Addressee::resource() const
1509 1509
1510//US
1511QString Addressee::resourceLabel()
1512{
1513 return i18n("Resource");
1514}
1515
1510void Addressee::setChanged( bool value ) 1516void Addressee::setChanged( bool value )
diff --git a/kabc/addressee.h b/kabc/addressee.h
index ee98e03..393d1cc 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -794,2 +794,8 @@ class Addressee
794 /** 794 /**
795 Return resourcelabel.
796 */
797 //US
798 static QString resourceLabel();
799
800 /**
795 Mark addressee as changed. 801 Mark addressee as changed.
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 41bbfde..bc2e176 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -34,2 +34,3 @@ $Id$
34#include "field.h" 34#include "field.h"
35#include "resource.h"
35 36
@@ -84,3 +85,4 @@ class Field::FieldImpl
84 Note, 85 Note,
85 Url 86 Url,
87 Resource
86 }; 88 };
@@ -192,2 +194,4 @@ QString Field::label()
192 return Addressee::urlLabel(); 194 return Addressee::urlLabel();
195 case FieldImpl::Resource:
196 return Addressee::resourceLabel();
193 case FieldImpl::CustomField: 197 case FieldImpl::CustomField:
@@ -269,2 +273,5 @@ QString Field::value( const KABC::Addressee &a )
269 return a.url().prettyURL(); 273 return a.url().prettyURL();
274//US
275 case FieldImpl::Resource:
276 return a.resource()->resourceName();
270 case FieldImpl::HomePhone: 277 case FieldImpl::HomePhone:
@@ -362,2 +369,4 @@ bool Field::setValue( KABC::Addressee &a, const QString &value )
362 a.insertCustom( mImpl->app(), mImpl->key(), value ); 369 a.insertCustom( mImpl->app(), mImpl->key(), value );
370//US never copy the resourcename back to the adressee.
371 case FieldImpl::Resource:
363 default: 372 default:
@@ -410,2 +419,3 @@ Field::List Field::allFields()
410 createField( FieldImpl::Url ); 419 createField( FieldImpl::Url );
420 createField( FieldImpl::Resource );
411 } 421 }
@@ -470,3 +480,3 @@ void Field::saveFields( KConfig *cfg, const QString &identifier,
470//US 480//US
471//US qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1()); 481// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
472 482
@@ -476,3 +486,3 @@ void Field::saveFields( KConfig *cfg, const QString &identifier,
476//US 486//US
477//US qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId()); 487// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId());
478 488
@@ -493,2 +503,5 @@ Field::List Field::restoreFields( const QString &identifier )
493{ 503{
504//US
505// qDebug("Field::restoreFields, identifier: %s", identifier.latin1());
506
494 KConfig *cfg = KGlobal::config(); 507 KConfig *cfg = KGlobal::config();
@@ -506,3 +519,3 @@ Field::List Field::restoreFields( KConfig *cfg, const QString &identifier )
506//US 519//US
507 qDebug("Field::restoreFields from %s", cfg->getFileName().latin1()); 520// qDebug("Field::restoreFields from %s, identifier: %s", cfg->getFileName().latin1(), identifier.latin1());
508 521
@@ -546,2 +559,5 @@ Field *Field::createCustomField( const QString &label, int category,
546 label, key, app ) ); 559 label, key, app ) );
560//US
561// qDebug("Field::createCustomField label %s", label.latin1() );
562
547 mCustomFields.append( field ); 563 mCustomFields.append( field );