summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-19 15:19:29 (UTC)
committer zautrix <zautrix>2005-04-19 15:19:29 (UTC)
commitb36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235 (patch) (side-by-side diff)
treec1d6a10633c0b57f68c6d5e10e1f427b96dee0c5
parentda4130c979ec1ea278183ef7697777cb4d1f5101 (diff)
downloadkdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.zip
kdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.tar.gz
kdepimpi-b36bdf88fbf3cc78e4bf072b5eb3ec16bd8ec235.tar.bz2
fix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--kaddressbook/kaimportoldialog.cpp1
2 files changed, 7 insertions, 0 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 0474b0c..89a6d7f 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,49 +1,55 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.1.2 ************
+
+Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
+
+Fixed a problem when importing data from Outlook with mutiple categories set.
+
********** VERSION 2.1.1 ************
Stable release 2.1.1!
KO/Pi:
Fixed one problem in the layout of the edit dialogs on the Zaurus with 640x480 display.
********** VERSION 2.1.0 ************
Stable release 2.1.0!
Summary of changes/fixes compared to version 2.0.6:
Many bugs of version 2.0.6 fixed.
Most of them were small bugs, but some of them were important.
It is recommended to use version 2.1.0 and not version 2.0.6.
Important changes:
Added recurring todos to KO/Pi.
Added global application font settings (for all KDE-Pim/Pi apps) to the general settings.
Made Passwordmanager PwM/Pi more userfriendly: Rearranged some toolbar icons, optimized setting of focus, fixed layout problems and more.
Datenavigator can now display many months. Very useful on the desktop.
KO/Pi alarm applet changed: Made buttons in alarm dialog much bigger and other usebility enhancements.
Made alarm sound working on Linux desktop.
Made KO/Pi and KA/Pi running from a memory stick. Please read storage HowTo for details.
Added timetracking feature in KO/Pi todo view. Please read timetraker HowTo for details.
Many other usebility enhancements.
Special thanks to Ben for his suggestions!
You can find the complete changelog
from version 1.7.7 to 2.1.0
in the source package or on
http://www.pi-sync.net/html/changelog.html
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index 848d8af..7bb8bd8 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -60,512 +60,513 @@ _Application gOlAppAB;
QDateTime mDdate2Qdtr( DATE dt)
{
COleDateTime odt;
SYSTEMTIME st;
odt = dt;
if ( odt.GetStatus() != 0 )
return QDateTime();
odt.GetAsSystemTime(st);
if ( st.wYear > 4000 ) // this program as a year 4000 bug!
return QDateTime();
// it seems so, that 1.1.4501 indicates: DATE invalid
QDateTime qdt (QDate(st.wYear, st.wMonth,st.wDay ),QTime( st.wHour, st.wMinute,st.wSecond ) );
return qdt;
}
class OLEListViewItem : public QCheckListItem
{
public:
OLEListViewItem( QListView *parent, QString text ) :
QCheckListItem( parent, text, QCheckListItem::CheckBox ) { ; };
OLEListViewItem( QListViewItem *after, QString text ) :
QCheckListItem( after, text, QCheckListItem::CheckBox ) { ; };
~OLEListViewItem() {};
void setData( DWORD data ) {mData= data; };
DWORD data() { return mData ;};
private:
DWORD mData;
};
KAImportOLdialog::KAImportOLdialog( const QString &caption,
KABC::AddressBook * aBook, QWidget *parent ) :
KDialogBase( Plain, caption, User1 | Close, Ok,
parent, caption, true, false, i18n("Import!") )
{
QHBox * mw = new QHBox( this );
setMainWidget( mw );
mListView = new QListView( mw );
mListView->addColumn(i18n("Select Folder to import"));
mListView->addColumn(i18n("Content Type"));
mABook = aBook;
connect( this, SIGNAL( user1Clicked() ),SLOT ( slotApply()));
setupFolderView();
resize( sizeHint().width()+50, sizeHint().height()+50 );
}
KAImportOLdialog::~KAImportOLdialog()
{
}
KABC::Addressee::List KAImportOLdialog::getAddressList()
{
return mAList;
}
void KAImportOLdialog::setupFolderView()
{
SCODE sc = ::OleInitialize(NULL);
if ( FAILED ( sc ) ) {
KMessageBox::information(this,"OLE initialisation failed");
return;
}
if(!gOlAppAB.CreateDispatch(_T("Outlook.Application"),NULL)){
KMessageBox::information(this,"Sorry, cannot access Outlook");
return ;
}
MAPIFolder mfInbox;
MAPIFolder mfRoot;
CString szName;
_NameSpace olNS;
olNS = gOlAppAB.GetNamespace(_T("MAPI"));
mfInbox = olNS.GetDefaultFolder(6);
mfRoot = mfInbox.GetParent();
szName = mfRoot.GetName();
long iType = mfRoot.GetDefaultItemType();
QString mes;
mes = QString::fromUcs2( szName.GetBuffer() );
OLEListViewItem * root = new OLEListViewItem( mListView, mes );
mfRoot.m_lpDispatch->AddRef();
addFolder( root, mfRoot.m_lpDispatch );
root->setOpen( true );
mListView->setSortColumn( 0 );
mListView->sort( );
}
void KAImportOLdialog::addFolder(OLEListViewItem* iParent, LPDISPATCH dispParent)
{
MAPIFolder mfParent(dispParent), mfChild;
_Folders folders;
_variant_t fndx((long)0);
CString szName;
long iType;
OLEListViewItem* hChild;
folders = mfParent.GetFolders();
for(int i=1; i <= folders.GetCount(); ++i)
{
fndx = (long)i;
mfChild = folders.Item(fndx.Detach());
mfChild.m_lpDispatch->AddRef();
szName = mfChild.GetName();
iType = mfChild.GetDefaultItemType();
hChild = new OLEListViewItem( iParent , QString::fromUcs2( szName.GetBuffer() ) );
if ( iType != 2)
hChild->setEnabled( false );
QString ts;
switch( iType ) {
case 0:
ts = i18n("Mail");
break;
case 1:
ts = i18n("Calendar");
break;
case 2:
ts = i18n("Contacts");
break;
case 3:
ts = i18n("Todos");
break;
case 4:
ts = i18n("Journals");
break;
case 5:
ts = i18n("Notes");
break;
default:
ts = i18n("Unknown");
}
hChild->setText( 1,ts);
hChild->setData( (DWORD) mfChild.m_lpDispatch );
mfChild.m_lpDispatch->AddRef();
addFolder(hChild, mfChild.m_lpDispatch);
}
}
void KAImportOLdialog::slotApply()
{
importedItems = 0;
OLEListViewItem* child = (OLEListViewItem*) mListView->firstChild();
while ( child ) {
if ( child->isOn() )
readContactData( child->data() );
child = (OLEListViewItem*) child->itemBelow();
}
QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems);
KMessageBox::information(this,mes);
}
void KAImportOLdialog::readContactData( DWORD folder )
{
LPDISPATCH dispItem = (LPDISPATCH)folder;
dispItem->AddRef();
MAPIFolder mf(dispItem);
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;
int i;
folderItems = mf.GetItems();
QProgressBar bar( folderItems.GetCount(),0 );
bar.setCaption (i18n("Importing - close to abort!") );
int h = bar.sizeHint().height() ;
int w = 300;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
for(i=1; i <= folderItems.GetCount(); ++i)
{
qApp->processEvents();
if ( ! bar.isVisible() )
return ;
bar.setProgress( i );
indx = (long)i;
itm = folderItems.Item(indx.Detach());
_ContactItem * pItem = (_ContactItem *)&itm;
ol2kapiContact( pItem );
itm->Release();
}
}
void KAImportOLdialog::slotOk()
{
QDialog::accept();
}
void KAImportOLdialog::ol2kapiContact( _ContactItem * aItem )
{
KABC::Addressee addressee;
addressee.setUid( QString::fromUcs2(aItem->GetEntryID().GetBuffer()));
//GetLastModificationTime()
//addressee.setName( const QString &name );
//addressee.setFormattedName( const QString &formattedName );
addressee.setFamilyName( QString::fromUcs2(aItem->GetLastName().GetBuffer()) );
addressee.setGivenName( QString::fromUcs2(aItem->GetFirstName().GetBuffer()) );
addressee.setAdditionalName( QString::fromUcs2(aItem->GetMiddleName().GetBuffer()) );
addressee.setPrefix(QString::fromUcs2(aItem->GetTitle().GetBuffer()) );
addressee.setSuffix( QString::fromUcs2(aItem->GetSuffix().GetBuffer()) );
addressee.setNickName( QString::fromUcs2(aItem->GetNickName().GetBuffer()) );
QDateTime dtb = mDdate2Qdtr(aItem->GetBirthday());
if ( dtb.isValid() )
addressee.setBirthday( mDdate2Qdtr(aItem->GetBirthday()));
//QString::fromUcs2(aItem->.GetBuffer())
//addressee.setMailer( const QString &mailer );
//addressee.setTimeZone( const TimeZone &timeZone );
//addressee.setGeo( const Geo &geo );
//addressee.setTitle( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );// titel is the prefix
addressee.setRole( QString::fromUcs2(aItem->GetJobTitle().GetBuffer()) );
addressee.setOrganization( QString::fromUcs2(aItem->GetCompanyName().GetBuffer()).replace( QRegExp("\\r"), "") );
QString notesStr = QString::fromUcs2(aItem->GetBody().GetBuffer());
notesStr.replace( QRegExp("\\r"), "");
addressee.setProductId( QString::fromUcs2(aItem->GetCustomerID().GetBuffer()) );
//addressee.setRevision( const QDateTime &revision );
// addressee.setSortString( const QString &sortString );
addressee.setUrl( QString::fromUcs2(aItem->GetWebPage().GetBuffer()) );
QString tempS;
tempS = QString::fromUcs2(aItem->GetNetMeetingAlias().GetBuffer())+" AT SERVER: " +QString::fromUcs2(aItem->GetNetMeetingServer().GetBuffer());
if ( tempS.length() > 12 )
addressee.insertCustom( "KADDRESSBOOK", "X-IMAddress", tempS );
tempS = QString::fromUcs2(aItem->GetSpouse().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tempS );
tempS = QString::fromUcs2(aItem->GetManagerName().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-ManagersName", tempS );
tempS = QString::fromUcs2(aItem->GetAssistantName().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-AssistantsName", tempS );
tempS = QString::fromUcs2(aItem->GetDepartment().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Department", tempS );
tempS = QString::fromUcs2(aItem->GetOfficeLocation().GetBuffer()).replace( QRegExp("\\r"), "");
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Office",tempS );
tempS = QString::fromUcs2(aItem->GetProfession().GetBuffer());
if ( !tempS.isEmpty() )
addressee.insertCustom( "KADDRESSBOOK", "X-Profession", tempS );
dtb = mDdate2Qdtr(aItem->GetAnniversary());
if (dtb.isValid() ) {
QString dt = KGlobal::locale()->formatDate( dtb.date() , true, KLocale::ISODate);
addressee.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
}
int sec = aItem->GetSensitivity() ;
if ( sec > 1 )// mapping pers -> private
--sec;
addressee.setSecrecy( sec );
//addressee.setLogo( const Picture &logo );
//addressee.setPhoto( const Picture &photo );
//addressee.setSound( const Sound &sound );
//addressee.setAgent( const Agent &agent );
QString cat = QString::fromUcs2( aItem->GetCategories().GetBuffer()).replace( QRegExp("\\r"), "");
+ cat = cat.replace( QRegExp("; "), ";");
addressee.setCategories( QStringList::split( ";", cat ));
QString phoneS;
phoneS = QString::fromUcs2( aItem->GetAssistantTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Voice ) );
phoneS = QString::fromUcs2( aItem->GetBusinessTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
phoneS = QString::fromUcs2( aItem->GetBusiness2TelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work ) );
phoneS = QString::fromUcs2( aItem->GetBusinessFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetCarTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Car ) );
phoneS = QString::fromUcs2( aItem->GetHomeTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
phoneS = QString::fromUcs2( aItem->GetHome2TelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home ) );
phoneS = QString::fromUcs2( aItem->GetHomeFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Home + KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetISDNNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Isdn ) );
phoneS = QString::fromUcs2( aItem->GetMobileTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Cell ) );
phoneS = QString::fromUcs2( aItem->GetOtherFaxNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax ) );
phoneS = QString::fromUcs2( aItem->GetOtherTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice ) );
phoneS = QString::fromUcs2( aItem->GetPagerNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pager ) );
phoneS = QString::fromUcs2( aItem->GetPrimaryTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Pref ) );
phoneS = QString::fromUcs2( aItem->GetTTYTDDTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Modem ) );
phoneS = QString::fromUcs2( aItem->GetTelexNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Fax + KABC::PhoneNumber::Bbs ) );
phoneS = QString::fromUcs2( aItem->GetCompanyMainTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Work + KABC::PhoneNumber::Pref ) );
phoneS = QString::fromUcs2( aItem->GetRadioTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Video ) );
phoneS = QString::fromUcs2( aItem->GetCallbackTelephoneNumber().GetBuffer());
if ( ! phoneS.isEmpty())
addressee.insertPhoneNumber( KABC::PhoneNumber(phoneS ,KABC::PhoneNumber::Voice + KABC::PhoneNumber::Pref ) );
bool preferred = true;
phoneS = QString::fromUcs2( aItem->GetEmail1Address().GetBuffer());
if ( ! phoneS.isEmpty()) {
addressee.insertEmail(phoneS , preferred );
preferred = false;
}
phoneS = QString::fromUcs2( aItem->GetEmail2Address().GetBuffer());
if ( ! phoneS.isEmpty()) {
addressee.insertEmail(phoneS , preferred );
preferred = false;
}
phoneS = QString::fromUcs2( aItem->GetEmail3Address().GetBuffer());
if ( ! phoneS.isEmpty()) {
addressee.insertEmail(phoneS , preferred );
preferred = false;
}
// is this the number of the preferred email?
// long GetSelectedMailingAddress();???
KABC::Address addressHome;
KABC::Address* addressAdd = &addressHome;
bool insert = false;
phoneS = QString::fromUcs2( aItem->GetHomeAddressCountry().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setCountry(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddressState().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setRegion(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddressCity().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setLocality(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddressPostalCode().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostalCode(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddressPostOfficeBox().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostOfficeBox(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddressStreet().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setStreet(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetHomeAddress().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
// redundant !addressAdd->setExtended(phoneS );
// insert = true;
}
addressAdd->setType( KABC::Address::Home );
if ( insert )
addressee.insertAddress( *addressAdd );
// ++++++++++++++++++++++ end of address
KABC::Address addressWork;
addressAdd = &addressWork;
insert = false;
phoneS = QString::fromUcs2( aItem->GetBusinessAddressCountry().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setCountry(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddressState().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setRegion(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddressCity().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setLocality(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostalCode().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostalCode(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddressPostOfficeBox().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostOfficeBox(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddressStreet().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setStreet(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetBusinessAddress().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
// redundant !addressAdd->setExtended(phoneS );
// insert = true;
}
addressAdd->setType( KABC::Address::Work );
if ( insert )
addressee.insertAddress( *addressAdd );
// ++++++++++++++++++++++ end of address
KABC::Address addressOther;
addressAdd = &addressOther;
insert = false;
phoneS = QString::fromUcs2( aItem->GetOtherAddressCountry().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setCountry(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddressState().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setRegion(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddressCity().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setLocality(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddressPostalCode().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostalCode(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddressPostOfficeBox().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostOfficeBox(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddressStreet().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setStreet(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetOtherAddress().GetBuffer());
if ( ! phoneS.isEmpty()) {
// redundant !addressAdd->setExtended(phoneS );
//insert = true;
}
//addressAdd->setId( );
if ( insert )
addressee.insertAddress( *addressAdd );
// ++++++++++++++++++++++ end of address
KABC::Address addressMail;
addressAdd = &addressMail;
insert = false;
phoneS = QString::fromUcs2( aItem->GetMailingAddressCountry().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setCountry(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetMailingAddressState().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setRegion(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetMailingAddressCity().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setLocality(phoneS );
insert = true;
}
phoneS = QString::fromUcs2( aItem->GetMailingAddressPostalCode().GetBuffer());
phoneS.replace( QRegExp("\\r"), "");
if ( ! phoneS.isEmpty()) {
addressAdd->setPostalCode(phoneS );
insert = true;
}