Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 185a8d50 authored by Laurent Montel's avatar Laurent Montel 😁

We need version for vcard4.0

parent 679311d5
......@@ -264,11 +264,11 @@ QByteArray VCardTool::createVCards( const Addressee::List &list,
Key::List::ConstIterator keyIt;
Key::List::ConstIterator keyEnd( keys.end() );
for ( keyIt = keys.begin(); keyIt != keyEnd; ++keyIt ) {
card.addLine( createKey( *keyIt ) );
card.addLine( createKey( *keyIt, version ) );
}
// LOGO
card.addLine( createPicture( QLatin1String( "LOGO" ), ( *addrIt ).logo() ) );
card.addLine( createPicture( QLatin1String( "LOGO" ), ( *addrIt ).logo(), version ) );
// MAILER only for version < 4.0
if ( version != VCard::v4_0 ) {
......@@ -347,7 +347,7 @@ QByteArray VCardTool::createVCards( const Addressee::List &list,
card.addLine( orgLine );
// PHOTO
card.addLine( createPicture( QLatin1String( "PHOTO" ), ( *addrIt ).photo() ) );
card.addLine( createPicture( QLatin1String( "PHOTO" ), ( *addrIt ).photo(), version ) );
// PROID only for version > 2.1
if ( version != VCard::v2_1 ) {
......@@ -371,7 +371,7 @@ QByteArray VCardTool::createVCards( const Addressee::List &list,
}
// SOUND
card.addLine( createSound( ( *addrIt ).sound() ) );
card.addLine( createSound( ( *addrIt ).sound(), version ) );
// TEL
const PhoneNumber::List phoneNumbers = ( *addrIt ).phoneNumbers();
......@@ -955,8 +955,9 @@ Picture VCardTool::parsePicture( const VCardLine &line ) const
return pic;
}
VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pic ) const
VCardLine VCardTool::createPicture( const QString &identifier, const Picture &pic, VCard::Version version ) const
{
Q_UNUSED(version);
VCardLine line( identifier );
if ( pic.isEmpty() ) {
......@@ -996,8 +997,9 @@ Sound VCardTool::parseSound( const VCardLine &line ) const
return snd;
}
VCardLine VCardTool::createSound( const Sound &snd ) const
VCardLine VCardTool::createSound( const Sound &snd, VCard::Version version ) const
{
Q_UNUSED(version);
VCardLine line( QLatin1String( "SOUND" ) );
if ( snd.isIntern() ) {
......@@ -1039,8 +1041,9 @@ Key VCardTool::parseKey( const VCardLine &line ) const
return key;
}
VCardLine VCardTool::createKey( const Key &key ) const
VCardLine VCardTool::createKey( const Key &key, VCard::Version version ) const
{
Q_UNUSED(version);
VCardLine line( QLatin1String( "KEY" ) );
if ( key.isBinary() ) {
......
......@@ -72,13 +72,13 @@ class KABC_EXPORT VCardTool
QString createDateTime( const QDateTime &dateTime ) const;
Picture parsePicture( const VCardLine &line ) const;
VCardLine createPicture( const QString &identifier, const Picture &pic ) const;
VCardLine createPicture(const QString &identifier, const Picture &pic, VCard::Version version) const;
Sound parseSound( const VCardLine &line ) const;
VCardLine createSound( const Sound &snd ) const;
VCardLine createSound( const Sound &snd, VCard::Version version ) const;
Key parseKey( const VCardLine &line ) const;
VCardLine createKey( const Key &key ) const;
VCardLine createKey( const Key &key, VCard::Version version ) const;
Secrecy parseSecrecy( const VCardLine &line ) const;
VCardLine createSecrecy( const Secrecy &secrecy ) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment