Getting the current active project

Matt Rogers mattr at kde.org
Mon Apr 2 16:11:05 UTC 2007


On Saturday 31 March 2007 06:32, Andreas Pakulat wrote:
> On 31.03.07 13:42:06, Andras Mantia wrote:
> > Hi,
> >
> >  At this moment it is not possible to find out what is the active
> > project inside KDevelop. In Quanta we need to know the current project
> > in the following places:
> >
> > - monitoring all opened project folders and notifying the user if there
> > was a change there. Problem: how will this work with remote projects?
>
> I don't think we support remote projects, atm.
>

The API (hopefully) has been written to allow the possibility for remote 
projects, so this is not a question to be disregarded.

> > - iterate over all the projects and do the check for each and everyone.
> > Problem: slower, more compilcated code.
>
> Well, iterating over a list isn't that slow, especially as the list of
> opened projects shouldn't be _that_ large (I think less than 20 projects
> is sane to anticipate). And the complicated code would be inside
> projectcontroller and it will exist anyway because we need a way to find
> the project or projectitem for a given url.
>
> > Thereby I request to introduce back the notion of the current project in
> > the KDevelop platform.
>
> What happens if your user actions or the other stuff doesn't get a
> project? For example currently if the first project is opened the
> currentProject is not yet set, its connected to the currentChanged
> signal of the treeview. Thus currentProject() would return a 0-pointer.
> While this can be "worked around" by automatically activating the first
> opened project, this won't work for closing projects. Then again there's
> no "current item" in the treeview and I don't think its sane to just
> select the top-most project in the treeview...
>
> Andreas

-- 
Matt
-------------- 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/20070402/c7a5cce0/attachment.sig>


More information about the KDevelop-devel mailing list