[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kaddressbook/xxport
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2005-12-10 17:45:06
Message-ID: 1134236706.450072.4742.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 487459 by tokoe:

Bugfix of #116006

BUGS:116006


 M  +12 -1     vcard_xxport.cpp  


--- branches/KDE/3.5/kdepim/kaddressbook/xxport/vcard_xxport.cpp #487458:487459
@@ -132,9 +132,20 @@
           return true;
 
         KABC::AddresseeList::ConstIterator it;
+        uint counter = 0;
         for ( it = list.begin(); it != list.end(); ++it ) {
-          url = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName() + \
".vcf"; +          QString testUrl;
+          if ( (*it).givenName().isEmpty() && (*it).familyName().isEmpty() )
+            testUrl = baseUrl.url() + "/" + (*it).organization();
+          else
+            testUrl = baseUrl.url() + "/" + (*it).givenName() + "_" + \
(*it).familyName();  
+          if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : \
QString::number( counter )) + ".vcf", false, parentWidget() ) ) { +            \
counter++; +            url = testUrl + QString::number( counter ) + ".vcf";
+          } else
+            url = testUrl + ".vcf";
+
           bool tmpOk;
           KABC::AddresseeList tmpList;
           tmpList.append( *it );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic