new KDevPlatform API for consideration

Andras Mantia amantia at kde.org
Thu May 25 15:53:55 UTC 2006


On Wednesday 24 May 2006 15:12, Matt Rogers wrote:
> On Wednesday 24 May 2006 05:44, Andras Mantia wrote:
> > On Wednesday 24 May 2006 05:16, Matt Rogers wrote:
> > > hmmm, no, absoluteUrl and relativeUrl should be removed perhaps.
> > > They seem completely useless ATM.
> >
> > Jumping in.. There is a need to calculate/convert urls to
> > absolute/relative urls based on the "project base".
> >
> > Andras
>
> use cases?

Well, for example we store the relative URL to the project base for each 
project file. I know for KDevelop it's KDevelop2 days, but we don't 
have files belonging to a build system describing what is in the 
project and what is not, so we list all files in the project file and 
assign some attributes to them. Similar thing will be required once 
David starts the teamwork mode support, as notes and such have to be 
associated to project files. 
So whenever you add a file to a project, the relative url based on the 
project base is stored in the project file. When you access it (eg. 
upload), the URL is converted to an absolute one so it can be passed to 
KIO. 
relative/absolute URL handling is needed in other cases as well, like 
when inserting a link/image into a file.
If you ask me if these conversion methods should be part of KDevelop or 
not, I can say that having good methods in kdelibs is better (and IIRC 
there is something like that in KUrl from KDE4). In that case a 
relative/absolute url conversion method in the project interface would 
be a convenience method, so you can omit a call (and an extra argument) 
to get the project base each time you calculate the relative url based 
on the project base.

Andras

-- 
Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20060525/7e879a3b/attachment.sig>


More information about the KDevelop-devel mailing list