Bug 135945

Summary: Tags with spaces are exported as multible tags
Product: [Applications] digikam Reporter: Birkir A. Barkarson <birkirb>
Component: Plugin-WebService-FlickrAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: ajw140
Priority: NOR    
Version: 5.6.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 0.1.0
Attachments: Patch

Description Birkir A. Barkarson 2006-10-19 08:28:38 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Fedora RPMs
OS:                Linux

Tags with names such as "Person/John" and "Person/James Williams" would result in three flickr tags, John, James and Williams.  This is different from the expected tags (corresponding to the ones in digikam) of John and "James Williams".
Comment 1 Andrew Wilkinson 2007-05-24 15:18:48 UTC
Created attachment 20685 [details]
Patch

This patch applies cleanly to SVN head, and fixes this problem for me.
Comment 2 caulier.gilles 2007-05-24 15:31:00 UTC
Birkir,

Thanks for the patch. I have take a look, and it sound fine for me.

I will apply it to svn...

Gilles
Comment 3 caulier.gilles 2007-05-24 15:34:49 UTC
SVN commit 667926 by cgilles:

kipi-plugins from trunk : patch from Andrew Wilkinson to prevent multiple Tags creation with Flickr Export plugin when Tags strings include spaces. 
CCMAIL: ajw140@york.ac.uk
BUG: 135945



 M  +9 -1      flickrtalker.cpp  


--- trunk/extragear/libs/kipi-plugins/flickrexport/flickrtalker.cpp #667925:667926
@@ -300,7 +300,15 @@
 		form.addPair("is_friend",isfriend);
 		headers.append("is_friend="+ isfriend);
 
-		QString tags=info.tags.join(" ");
+		QStringList taglist;
+		for(QStringList::Iterator iter = info.tags.begin(); iter != info.tags.end(); iter++) {
+			if((*iter).find(' ') != -1) {
+				taglist.append('"' + *iter + '"');
+			} else {
+				taglist.append(*iter);
+				}
+		}
+		QString tags=taglist.join(" ");
 		if(tags.length()>0){	
 			form.addPair("tags",tags);
 			headers.append("tags="+ tags);