[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdepim/KDE/4.9] importwizard: Continue to import thunderbird addressbook.
From: Montel Laurent <montel () kde ! org>
Date: 2012-07-27 11:53:32
Message-ID: 20120727115332.C1AD6A6094 () git ! kde ! org
[Download RAW message or body]
Git commit 545847a00d1f5ff4a2b95bb2e35689df15be96c7 by Montel Laurent.
Committed on 27/07/2012 at 13:52.
Pushed by mlaurent into branch 'KDE/4.9'.
Continue to import thunderbird addressbook.
Minor optimization when we import mime header
M +6 -0 importwizard/abstractsettings.cpp
M +2 -0 importwizard/abstractsettings.h
M +1 -2 importwizard/sylpheed/sylpheedsettings.cpp
M +41 -1 importwizard/thunderbird/thunderbirdaddressbook.cpp
http://commits.kde.org/kdepim/545847a00d1f5ff4a2b95bb2e35689df15be96c7
diff --git a/importwizard/abstractsettings.cpp b/importwizard/abstractsettings.cpp
index 5416a43..67873c0 100644
--- a/importwizard/abstractsettings.cpp
+++ b/importwizard/abstractsettings.cpp
@@ -99,6 +99,12 @@ void AbstractSettings::addCheckMailOnStartup(const QString& \
agentIdentifyName,bo addKmailConfig(groupName,QLatin1String("CheckOnStartup"), \
loginAtStartup); }
+void AbstractSettings::addComposerHeaderGroup( const QString& groupName, const \
QString& name, const QString& value ) +{
+ KConfigGroup group = mKmailConfig->group(groupName);
+ group.writeEntry(QLatin1String("name"),name);
+ group.writeEntry(QLatin1String("value"),value);
+}
void AbstractSettings::addKmailConfig( const QString& groupName, const QString& key, \
const QString& value) {
diff --git a/importwizard/abstractsettings.h b/importwizard/abstractsettings.h
index 99d1cfc..e3107c5 100644
--- a/importwizard/abstractsettings.h
+++ b/importwizard/abstractsettings.h
@@ -88,6 +88,8 @@ protected:
void addKmailConfig( const QString& groupName, const QString& key, bool value);
void addKmailConfig( const QString& groupName, const QString& key, int value);
+ void addComposerHeaderGroup( const QString& groupName, const QString& name, const \
QString& value ); +
void addKNodeConfig(const QString& groupName, const QString& key, bool value);
void addAkregatorConfig(const QString& groupName, const QString& key, bool value);
diff --git a/importwizard/sylpheed/sylpheedsettings.cpp \
b/importwizard/sylpheed/sylpheedsettings.cpp index 37959b2..923b056 100644
--- a/importwizard/sylpheed/sylpheedsettings.cpp
+++ b/importwizard/sylpheed/sylpheedsettings.cpp
@@ -92,8 +92,7 @@ void SylpheedSettings::readCustomHeader(QFile *customHeaderFile)
for (QMapIterator<QString, QString> it(header); it.hasNext(); )
{
it.next();
- addKmailConfig( QString::fromLatin1("Mime \
#%1").arg(currentHeader),QLatin1String("name"), (it).key());
- addKmailConfig( QString::fromLatin1("Mime \
#%1").arg(currentHeader),QLatin1String("value"), (it).value()); + \
addComposerHeaderGroup(QString::fromLatin1("Mime #%1").arg(currentHeader), \
(it).key(), (it).value()); ++currentHeader;
}
}
diff --git a/importwizard/thunderbird/thunderbirdaddressbook.cpp \
b/importwizard/thunderbird/thunderbirdaddressbook.cpp index 8531dd7..4d4c274 100644
--- a/importwizard/thunderbird/thunderbirdaddressbook.cpp
+++ b/importwizard/thunderbird/thunderbirdaddressbook.cpp
@@ -80,44 +80,68 @@ void ThunderBirdAddressBook::readAddressBook( const QString& \
filename ) const QString column = mork.getColumn(cellsIter.key());
kDebug()<<"column :"<<column<<" value :"<<value;
if( column == QLatin1String("LastModifiedDate" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("RecordKey" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("AddrCharSet" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("LastRecordKey" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("ns:addrbk:db:table:kind:pab" ) ) \
{ + qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("ListName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("ListNickName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("ListDescription" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("ListTotalAddresses" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("LowercaseListName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("ns:addrbk:db:table:kind:deleted" \
) ) { + qDebug()<<" column "<<column<<" found but not imported. Need \
to look at how to import it"; } else if( column == QLatin1String("PhotoType" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("PreferDisplayName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("PhotoURI" ) ) {
KABC::Picture photo;
photo.setUrl(value);
contact.setLogo(photo);
} else if( column == QLatin1String("PhotoName" ) ) {
//TODO: verify it
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("DbRowID" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("ns:addrbk:db:row:scope:card:all" \
) ) { + qDebug()<<" column "<<column<<" found but not imported. Need \
to look at how to import it";
} else if( column == QLatin1String("ns:addrbk:db:row:scope:list:all" \
) ) { + qDebug()<<" column "<<column<<" found but not imported. Need \
to look at how to import it";
} else if( column == QLatin1String("ns:addrbk:db:row:scope:data:all" \
) ) { + qDebug()<<" column "<<column<<" found but not imported. Need \
to look at how to import it"; } else if( column == QLatin1String("FirstName" ) ) {
contact.setName(value);
} else if( column == QLatin1String("LastName" ) ) {
contact.setFamilyName(value);
} else if( column == QLatin1String("PhoneticFirstName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("PhoneticLastName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("DisplayName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("NickName" ) ) {
contact.setNickName(value);
} else if( column == QLatin1String("PrimaryEmail" ) ) {
contact.setEmails(QStringList()<<value);
} else if( column == QLatin1String("LowercasePrimaryEmail" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("SecondEmail" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("PreferMailFormat" ) ) {
contact.insertCustom( QLatin1String( "KADDRESSBOOK" ), \
QLatin1String("MailPreferedFormatting"), value );
} else if( column == QLatin1String("PopularityIndex" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("AllowRemoteContent" ) ) {
contact.insertCustom( QLatin1String( "KADDRESSBOOK" ), \
QLatin1String("MailAllowToRemoteContent"), value ); } else if( column == \
QLatin1String("WorkPhone" ) ) { @@ -131,16 +155,23 @@ void \
ThunderBirdAddressBook::readAddressBook( const QString& filename ) } else if( column \
== QLatin1String("CellularNumber" ) ) {
contact.insertPhoneNumber( KABC::PhoneNumber( value, \
KABC::PhoneNumber::Cell ) ); } else if( column == QLatin1String("WorkPhoneType" ) ) \
{ + qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("HomePhoneType" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("FaxNumberType" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("PagerNumberType" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("CellularNumberType" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("HomeAddress" ) ) {
homeAddr.setStreet(value);
} else if( column == QLatin1String("HomeAddress2" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("HomeCity" ) ) {
homeAddr.setLocality(value);
} else if( column == QLatin1String("HomeState" ) ) {
+ homeAddr.setRegion(value);
} else if( column == QLatin1String("HomeZipCode" ) ) {
homeAddr.setPostalCode(value);
} else if( column == QLatin1String("HomeCountry" ) ) {
@@ -149,6 +180,7 @@ void ThunderBirdAddressBook::readAddressBook( const QString& \
filename ) workAddr.setStreet(value);
} else if( column == QLatin1String("WorkAddress2" ) ) {
} else if( column == QLatin1String("WorkCity" ) ) {
+ workAddr.setLocality(value);
} else if( column == QLatin1String("WorkState" ) ) {
workAddr.setRegion(value);
} else if( column == QLatin1String("WorkZipCode" ) ) {
@@ -160,14 +192,23 @@ void ThunderBirdAddressBook::readAddressBook( const QString& \
filename ) } else if( column == QLatin1String("Department" ) ) {
contact.setDepartment(value);
} else if( column == QLatin1String("Company" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("_AimScreenName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("AnniversaryYear" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it";
} else if( column == QLatin1String("AnniversaryMonth" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("AnniversaryDay" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("SpouseName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("FamilyName" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("WebPage1" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("WebPage2" ) ) {
+ qDebug()<<" column "<<column<<" found but not imported. Need to \
look at how to import it"; } else if( column == QLatin1String("BirthYear" ) ) {
birthyear = value.toInt();
} else if( column == QLatin1String("BirthMonth" ) ) {
@@ -187,7 +228,6 @@ void ThunderBirdAddressBook::readAddressBook( const QString& \
filename ) } else {
kDebug()<<" Columnn not implemented "<<column;
}
-
//qDebug()<<" value :"<<value<<" column"<<column;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic