KDE Source Code Now Under LXR

The KDE source code is now available under the LXR system, courtesy of our friends at nadmm.com.
Users and developers may now browse the KDE source code complete with cross-references, which should prove extremely useful. For those of you wondering about the difference between lxr.kde.org and webcvs.kde.org, read on for an explanation from Kurt.

Kurt Granroth writes:

There is actually a huge difference between a webcvs and an lxr site.

Using WebCVS, you can view the contents of a file at any revision and compare
differences between revisions.

Using LXR, you view only the current revision, but, every object in the file
is cross-referenced to every other object in the LXR database.

Let's take the KConfig class for example. I can go to the kconfig.h file in
WebCVS and view the current revision... or I can view past revisions... or I
can compare various revisions. To see how it has changed historically, this
is very handy. But say I want to know where KConfig is used elsewhere in KDE.
This is impossible to do automatically in WebCVS.

If I go to the KConfig class in LXR, though, I see that all objects and
methods in the file are hyperlinks. If I click on KConfig, I get a list of
where it is defined, where it is declared as a forward declaration, and where
it is referenced (in 939 files!). I can click on any of those links to go
directly to where it is used.

Or say I want to see where KSocket is defined and used in KDE. I go to the
identifier search and enter KSocket. I get a page listing everything I need to know.

Really, the importance of cross-referenced links to any large project can't
be emphasized enough. The only reason we haven't had something like this
before is because they are such a PITA to set up. :-/

Dot Categories: 

Comments

by Estevanm Neto (not verified)

I'm waiting...

by SteffenH (not verified)

*caugh* FTP-Server *caugh*

by Erik (not verified)

I checked on 2 mirrors that seemd to have all packages of 2.2beta1 except for kdesupport. Where is it? Or should I use kdesupport of 2.2alpha2?

by Inorog (not verified)

Theoretically you don't need kdesupport anymore (well, it was barely needed in the past too, but now changes have made that the absolutely needed stuff went to the appropriate kde* package - like kdenetwork). It mostly contained packages external to KDE that were anyways shipped with most distributions (this also potentially created version conflicts for some packages).

Of course, it much depends on the distro packagers if they prepared their packages so that they don't need anything in kdesupport. Let's hope.

by Andrea (not verified)

Hey,

why don't we set up some kind of 'reusability' contest for:
1)the most (re)used classes
2)the application that (re)uses the most of them?

It would be fun to see the hit list of them.

This would also give a better sensation to the programmers of how good a class has been tested.

Andrea

PS: is there a way of having infos at the method level, like: 'method foo1() of class AClass has never been used, method foo2() of class AClass has been used 25 times...' ?

by KDE User (not verified)

> is there a way of having infos at the method
> level, like: 'method foo1() of class AClass
> has never been used, method foo2() of class
> AClass has been used 25 times...' ?

Maybe, depends what you mean exactly. For example, go to the LXR page for KConfig class as given in the above example, and click on any method name (say, virtual void reparseConfiguration();).

by Inorog (not verified)

There is another great set of source code analysis tools that a friend of the KDE project has put in place: Amir Michail developped a code reusability measurment tool: CodeWeb, as well as a advanced CVS search tool: CVSSearch. It's a pity people don't put just a tiny bit of heart into getting these tools used in their daily work. They are great. Well, shame on me, as I'm one of those who doesn't.

These, together with lxr, could really really improve KDE developers' productivity a lot.

Here is an URL or three:
http://codeweb.sourceforge.net;
http://cvssearch.sourceforge.net;
http://www.cse.unsw.edu.au/~amichail/

by KDE User (not verified)

Great new logo! It revamps the site completely.

by Aris (not verified)

Yes really cool,
yet is it just me or the favicon has switched to yahoo's?
By the way, the favicon has not worked by me since the dot moved. Hope this gets fixed since I love my bookmarks bar in konqueror...

by Navindra Umanee (not verified)

Hmmm, it works for me and it's definitely not the Yahoo favicon. I guess konqueror is caching some wrong icon on your side, somehow.

Try deleting the appropriate icon from .kde/share/icons/favicons/

by Aris (not verified)

Well that was exactely it.
Thanks a lot.
Now my bookmarks bar looks great again :)

by kde-user (not verified)

I completely agree.

Stylish .. very stylish

by Joe (not verified)

Yes. Is that the master qwertz doing it again? I'd really like to see an icon set by qwertz. Has he made any icons for KDE? I think it would make the KDE desktop look _very_ classy. No offense, Thorsten. :)

by Lenny (not verified)

Problem is: icons have to be hand-crafted to look really good. Rendered and scaled-down icons always look worse. For large pictures, rendering rocks though.

by MiniMe (not verified)

That's great et all, but where is 2.2 beta 1? Should've been out today..

by MiniMe (not verified)

Whoops never mind ;)

by ac() (not verified)

"Really, the importance of cross-referenced links to any large project can't be emphasized enough"

Right.

"The only reason we haven't had something like this before is because they are such a PITA to set up"

Thanks for the great work !
Go KDE Go !!!!

by Jean-Christophe... (not verified)

Why I can't download the KDE-2.2beta1 files from the ftp site ? :(

Thanks

by Boris Stevenson (not verified)

KDE needs 1 more application now. A graphical FTP client similiar to CuteFTP.

by PE (not verified)

KBear??

by Kavau (not verified)

Hmmm.. isn't Konqueror a graphical ftp client?

by Randy Kramer (not verified)

Sorry, I don't know much about LXR or CVS, and I thought I'd take this opportunity to ask some questions. I'll understand if you don't have time to reply. ;-)

How does the code get into LXR? Does LXR use the code in CVS directly, or must it have a copy? (I'm assuming CVS is still the code repository.)

If it needs a copy, can LXR get it automatically, or must a script (or something) transfer occasional code snapshots?

Are there manual steps that must be taken to update the cross-references after LXR gets a new copy of the code?

Are you aware of a way to put comments in a separate file (tied, for example, to an identifier) and have LXR create a cross-reference to those comments?

Do you know of anything like LXR that works for Perl code?

Thanks,
Randy Kramer

by Nadeem Hasan (not verified)

LXR needs a local copy of the code to cross reference. No...it can't get it automatically. Someone needs to put the code there. Right now, the code is refreshed daily and cross referenced by a script. The LXR developers are working on a plug-in system that would make it possible to cross reference other languages.

by Randy Kramer (not verified)

Nadeem,

Thanks very much for your response!

Randy Kramer

by Kavau (not verified)

Just a simple question by an ignorant KDE fan - why can't I find any comments in the KDE source code? Is documenting the source code considered "uncool" here? Wouldn't it help new would-be KDE developers tremendously if there would be a minimal amount of documentation within the source code? It's a long time ago that I was an active programmer, but I remember a rule of thumb that said you should have at least as much comments as you have commands in your source code...

by Amir Michail (not verified)

Hi,

That's one of the reasons we built CVSSearch. We noticed that KDE developers typically write CVS comments but not code comments. So if you can associate the right CVS comment with the right code fragments in the most recent version of the code, then you have commented source.

Amir

by Navindra Umanee (not verified)

The .h files (API) are some of the best documented though.

-N.