Diffstat (limited to 'kabc/vcardparser/vcardtool.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kabc/vcardparser/vcardtool.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/kabc/vcardparser/vcardtool.cpp b/kabc/vcardparser/vcardtool.cpp index 01c5b3e..71f29d7 100644 --- a/kabc/vcardparser/vcardtool.cpp +++ b/kabc/vcardparser/vcardtool.cpp | |||
@@ -103,11 +103,22 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version ) | |||
103 | QMap<QString, int>::Iterator typeIt; | 103 | QMap<QString, int>::Iterator typeIt; |
104 | for ( typeIt = mAddressTypeMap.begin(); typeIt != mAddressTypeMap.end(); ++typeIt ) { | 104 | for ( typeIt = mAddressTypeMap.begin(); typeIt != mAddressTypeMap.end(); ++typeIt ) { |
105 | if ( typeIt.data() & (*it).type() ) { | 105 | if ( typeIt.data() & (*it).type() ) { |
106 | if ( version == VCard::v3_0 ) { | ||
107 | adrLine.addParameter( "TYPE", typeIt.key().lower() ); | ||
108 | } | ||
109 | else { | ||
106 | adrLine.addParameter( "TYPE", typeIt.key() ); | 110 | adrLine.addParameter( "TYPE", typeIt.key() ); |
107 | if ( hasLabel ) | 111 | } |
112 | if ( hasLabel ) { | ||
113 | if ( version == VCard::v3_0 ) { | ||
114 | labelLine.addParameter( "TYPE", typeIt.key().lower() ); | ||
115 | } | ||
116 | else { | ||
108 | labelLine.addParameter( "TYPE", typeIt.key() ); | 117 | labelLine.addParameter( "TYPE", typeIt.key() ); |
109 | } | 118 | } |
110 | } | 119 | } |
120 | } | ||
121 | } | ||
111 | 122 | ||
112 | card.addLine( adrLine ); | 123 | card.addLine( adrLine ); |
113 | if ( hasLabel ) | 124 | if ( hasLabel ) |
@@ -233,6 +244,9 @@ QString VCardTool::createVCards( Addressee::List list, VCard::Version version ) | |||
233 | QMap<QString, int>::Iterator typeIt; | 244 | QMap<QString, int>::Iterator typeIt; |
234 | for ( typeIt = mPhoneTypeMap.begin(); typeIt != mPhoneTypeMap.end(); ++typeIt ) { | 245 | for ( typeIt = mPhoneTypeMap.begin(); typeIt != mPhoneTypeMap.end(); ++typeIt ) { |
235 | if ( typeIt.data() & (*phoneIt).type() ) | 246 | if ( typeIt.data() & (*phoneIt).type() ) |
247 | if ( version == VCard::v3_0 ) | ||
248 | line.addParameter( "TYPE", typeIt.key().lower() ); | ||
249 | else | ||
236 | line.addParameter( "TYPE", typeIt.key() ); | 250 | line.addParameter( "TYPE", typeIt.key() ); |
237 | } | 251 | } |
238 | 252 | ||