[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: developer faq
From:       Philippe Fremy <pfremy () chez ! com>
Date:       2001-03-09 16:04:03
[Download RAW message or body]


On Thursday 08 March 2001 19:20, David Faure wrote:
> On Thursday 08 March 2001 17:41, Philippe Fremy wrote:
> > Hi,
> >
> > There use to be a developer faq on developer.kde.org but it has gone
> > away. I don't what was inside, but while I develop daily for Kde, I have
> > many questions that I would be glad to see answered in a faq. There are a
> > few documents available, but they don't answer my questions.
>
> Would you put such a document together, if I answered your questions ? :)
>

Yes, I will gather everything and put something online.


-- New developers  --
Heho, you are developing an app for kde ?
What are the problems you encounter ? Do you compile without problems ? Do 
you link without problems ? Do you debug without problems ?

If not, please mail me privately the problems you get. We will put them in a 
faq so that.


-- Core developers --
Every day, you are building and debugging applications. What the tricks you 
use. Attaching to known processing, watching certains log files, setting a 
breakpoint in main to have dynamic libraries loaded, disabling debug output, 
all these tricks could help other middle developers like us. Please post them 
here and mail them to me directly, so that we put them in a faq.


> > - how to rebuild ksycoca database ?
>
> No, that's completely unrelated. "How" : by typing "kbuildsycoca".
> "When": in theory never. But if you suspect a corruption of your database,
> or if you think it hasn't picked up a change in the global or local desktop
Exaclyt. For example, I just installed a kpart in my .kde/lib and a .desktop 
but it doesn't show-up. What do I do ?

> > - how to avoid KCrash ?
> > I want a real core file but KCrash is coming there. Now I use export
> > KDE_DEBUG=hop but I don't even know if there is a finer setting
>
> KDE_DEBUG=1 is more common :-)
Ok, no fine tuning here.


> > - how to control debug output ?
> > There is a lot of debug output being printed, how can I control it ?
>
> Using kdebugdialog, you can control which areas of debug output you want to
> see.
>
Mmh, I didn't remember the name of this program. It lacks a feature 
'check/uncheck all entries matching regexp', to help configuring it quickly.


> > What's the best way to add debut output to my program ? I know there are
> > tweaks with kdebug and taking a number or things like that but don't know
> > the details.
>
> There's actually a doc on this, in kdebase/doc/kdebugdialog.
The doc, the thing that never compiles!

Is there a way to 
- always avoid the doc to compile ?
- always avoid the doc to update when using cvs update ?

> The best way? Just using kdDebug(). Areas are more suited for libraries,
> so that "users" of the libraries can turn off the library's debug output to
> see their own.
How do you define an area ?

I just read the doc for kdebugdialog, there is a serious flaw. Why isn't 
there one window proposing to configure areas like in full mode or to check 
area like in normal mode. Having two programs in one commandline is not a 
good idea, especially when one feature is somehow hidden. There is no help 
menu in kdebugdialog by the way.

Someone need to spend one hour or two to make it a decent tool. I would 
prefer you to spend these hour on kword, so it is up to a normal developer 
like me to fix it. Unfortunately, my personal agenda is already full with 
other stuff.


> > - compilation faq ?
> > What does --enable-final do ? Is it good to have it when you develop
> > (No!). I remember to have seen once that you can precise that you don't
> > want certain packages to be compiled at configure time.
>


> Also, "make final" uses this trick in a given directory only, and
> "make no-final" compiles normally in a module configured with
Hehe, good tips.

Is there other cool targets to know in the Makfile ? I only know 
make all, make clean and make distclean.

> > If I add a new QObject in my program, what should I do to get the .moc
> > automatically generated ?
>
> METASOURCES = AUTO
The thing is, if I add that QOjbect _after_ having generated the Makefile, in 
a file that was already in the Makefile but didn't contain QObject, it won't 
be noticed by the Makefile and my program won't compile, right ? I need to do 
a perl am_edit for that, right ?

>
> > Idem if I add a DCOP interface.
>
> Add blah.skel or blah.stub to the _SOURCES line.
Idem, will it be always noticed by the Makefile ?

>
> > - how to print a QString ?
> your ~/.gdbinit where /mnt/kdecvs is the path to your sources,
> in which you checked out the kdesdk/scripts module :)
cool, this is not listed in the README


> Create the basis of this document, with all the above, on developer.kde.org
> (which is under the CVS module "developer.kde.org"). Then invite others to
> contribute to it :-)
>
I will, if I find time to do it.

	Philippe

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic