Bug 140959

Summary: setGlobalPhoto urlencodes dir with space
Product: [Unmaintained] kopete Reporter: peppelorum <peppe>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 0.12.3   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description peppelorum 2007-01-31 16:31:19 UTC
Version:           0.12.3 (using KDE 3.5.5, Debian Package 4:3.5.5a.dfsg.1-5 (4.0))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.18.2

I'm trying to set an image in kopete with dcop, but fails when the url contains a space.

dcop kopete KopeteIface setGlobalPhoto '/dir with space/image.jpg'
turns into "/dir%20with%20space/image.jpg" in kopetes dialog.

I don't know if this is me or something else but to change nickname with a space works just fine (dcop kopete KopeteIface setGlobalNickname 'name and name')
Comment 1 Will Stephenson 2007-03-28 13:08:17 UTC
You mean that the changed photo does not show up in the identity config dialog.  But the photo is changed, and the changed photo is visible to other contacts.
Comment 2 peppelorum 2007-03-28 13:19:26 UTC
Ah, I didn't think of that! Yes, the photo is not visible in the identity dialog. So maybe this bug should have another title then.
Comment 3 Will Stephenson 2007-03-28 15:48:35 UTC
SVN commit 647486 by wstephens:

Don't feed the encoded URL to the KURLRequester; QImage can't read it
BUG: 140959


 M  +3 -1      kopeteidentityconfig.cpp  


--- branches/work/kopete/avdevice_overhaul/kopete/config/identity/kopeteidentityconfig.cpp #647485:647486
@@ -323,7 +323,7 @@
 		}
 	}
 
-	d->m_view->comboPhotoURL->setURL(d->currentIdentity->customPhoto().url());
+	d->m_view->comboPhotoURL->setURL(d->currentIdentity->customPhoto().pathOrURL());
 	Kopete::MetaContact::PropertySource photoSource = d->currentIdentity->photoSource();
 
 	d->m_view->radioPhotoCustom->setChecked(photoSource == Kopete::MetaContact::SourceCustom);
@@ -378,7 +378,9 @@
 			photo = Kopete::photoFromContact(selectedNameSourceContact());
 			break;
 		case Kopete::MetaContact::SourceCustom:
+			QString url = d->m_view->comboPhotoURL->url();
 			photo = QImage(d->m_view->comboPhotoURL->url());
+			bool null = photo.isNull();
 			break;
 	}