unused: IProject::urlRelativeToProject
Milian Wolff
mail at milianw.de
Fri Apr 24 17:22:14 UTC 2009
On Friday 24 April 2009, Milian Wolff wrote:
> The method urlRelativeToProject (from IProject) is never being called in
> kdevelop / kdevplatform.
>
> Should it be removed or does someone think it's required?
>
> I'd have to make it supports remote URLs which I'm not sure it's currently
> doing properly. But still the following should be OK to commit, right?
>
> - if ( KUrl::isRelativeUrl( relativeUrl.toLocalFile() ) )
> + if ( relativeUrl.isRelative() ) {
Oh and what I forgot what apol suggested to me:
- if ( KUrl::isRelativeUrl( relativeUrl.toLocalFile() ) )
- return KUrl( folder(), relativeUrl.toLocalFile() );
+ if ( relativeUrl.isRelative() ) {
+ kDebug() << "build relative url from " << folder() <<
relativeUrl.path() << KUrl(folder(), relativeUrl.path());
+ return KUrl( folder(), relativeUrl.path() );
+ }
I still think this wont work since the KUrl copy-constructor is at least for
me broken in that it strips the protocol. I think I'd have to do something
differently here...
// keeps protocol:
KUrl tmp = folder();
// now how do I apply the relative url?
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20090424/74d631aa/attachment.sig>
More information about the KDevelop-devel
mailing list