Skip to content

KDE Source Code Now Under LXR

Tuesday, 3 July 2001  |  Numanee

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. :-/

Comments:

Where's KDE 2.2 Beta 1? It's 02/07! - Estevanm Neto - 2001-07-03

I'm waiting...

Re: Where's KDE 2.2 Beta 1? It's 02/07! - SteffenH - 2001-07-03

*caugh* FTP-Server *caugh*

Can't find kdesupport-2.2beta1 - Erik - 2001-07-04

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?

Re: Can't find kdesupport-2.2beta1 - Inorog - 2001-07-04

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.

Re: KDE Source Code Now Under LXR - Andrea - 2001-07-03

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...' ?

Re: KDE Source Code Now Under LXR - KDE User - 2001-07-03

> 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();).

LXR, CodeWeb, CVSSearch - Inorog - 2001-07-04

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. <p> These, together with lxr, could really really improve KDE developers' productivity a lot. <p> Here is an URL or three: <br> <a href="http://codeweb.sourceforge.net">http://codeweb.sourceforge.net</a>;<br> <a href="http://cvssearch.sourceforge.net">http://cvssearch.sourceforge.net</a>;<br> <a href="http://www.cse.unsw.edu.au/~amichail/">http://www.cse.unsw.edu.au/~amichail/</a>

offtopic: logo - KDE User - 2001-07-03

Great new logo! It revamps the site completely.

Re: offtopic: logo - Aris - 2001-07-03

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...

Re: offtopic: logo - Navindra Umanee - 2001-07-03

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/

Re: offtopic: logo - Aris - 2001-07-04

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

Re: offtopic: logo - kde-user - 2001-07-03

I completely agree. Stylish .. very stylish

Re: offtopic: logo - Joe - 2001-07-03

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. :)

Re: offtopic: logo - Lenny - 2001-07-03

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.

Re: KDE Source Code Now Under LXR - MiniMe - 2001-07-03

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

Re: KDE Source Code Now Under LXR - MiniMe - 2001-07-03

Whoops never mind ;)

Re: KDE Source Code Now Under LXR - ac() - 2001-07-03

"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 !!!!

KDE 2.2 beta1 - Jean-Christophe Fargette - 2001-07-03

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

Re: KDE Source Code Now Under LXR - Boris Stevenson - 2001-07-04

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

Re: KDE Source Code Now Under LXR - PE - 2001-07-04

KBear??

Re: KDE Source Code Now Under LXR - Kavau - 2001-07-05

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

Re: KDE Source Code Now Under LXR - Randy Kramer - 2001-07-04

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

Re: KDE Source Code Now Under LXR - Nadeem Hasan - 2001-07-04

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.

Re: KDE Source Code Now Under LXR - Randy Kramer - 2001-07-05

Nadeem, Thanks very much for your response! Randy Kramer

Source code documentation? - Kavau - 2001-07-05

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...

Re: Source code documentation? - Amir Michail - 2001-07-05

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

Re: Source code documentation? - Navindra Umanee - 2001-07-06

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