Diffstat (limited to 'kabc/vcardparser/vcardtool.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/vcardparser/vcardtool.cpp | 22 |
1 files changed, 18 insertions, 4 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,9 +103,20 @@ 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 | adrLine.addParameter( "TYPE", typeIt.key() ); | 106 | if ( version == VCard::v3_0 ) { |
107 | if ( hasLabel ) | 107 | adrLine.addParameter( "TYPE", typeIt.key().lower() ); |
108 | labelLine.addParameter( "TYPE", typeIt.key() ); | 108 | } |
109 | else { | ||
110 | adrLine.addParameter( "TYPE", typeIt.key() ); | ||
111 | } | ||
112 | if ( hasLabel ) { | ||
113 | if ( version == VCard::v3_0 ) { | ||
114 | labelLine.addParameter( "TYPE", typeIt.key().lower() ); | ||
115 | } | ||
116 | else { | ||
117 | labelLine.addParameter( "TYPE", typeIt.key() ); | ||
118 | } | ||
119 | } | ||
109 | } | 120 | } |
110 | } | 121 | } |
111 | 122 | ||
@@ -233,7 +244,10 @@ 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() ) |
236 | line.addParameter( "TYPE", typeIt.key() ); | 247 | if ( version == VCard::v3_0 ) |
248 | line.addParameter( "TYPE", typeIt.key().lower() ); | ||
249 | else | ||
250 | line.addParameter( "TYPE", typeIt.key() ); | ||
237 | } | 251 | } |
238 | 252 | ||
239 | card.addLine( line ); | 253 | card.addLine( line ); |