Bug 140959 - setGlobalPhoto urlencodes dir with space
Summary: setGlobalPhoto urlencodes dir with space
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 0.12.3
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-31 16:31 UTC by peppelorum
Modified: 2007-03-28 15:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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;
 	}