[Kde-perl] Suspicious QWidget Initialization Behaviour

Gary Greene greeneg at tolharadys.net
Tue Aug 11 08:11:16 CEST 2009


On Monday 10 August 2009 10:36:52 pm Chris Burel wrote:
> > Dunno if this still works in PerlQt4, did in 3....
> > Another useful aspect is doing the following:
> >
> > use Qt::debug qw| CHANNEL |;
> >
> > Where CHANNEL is one of:
> >
> > ambiguous, verbose, calls, autoload, gc, virtual, all
> 
> These are still present in PerlQt4, but have to be enabled at compile
> time.  Maybe I'm mistaken, but I figured that stuff was only useful to
> people developing the bindings, and not to normal users of the
> bindings.  So I thought it was silly to have a bunch of "if( debug )"
> tests when running normal code.
> If you want to enable those debug messages, specify -DDEBUG while
>  compiling. On that note, is there a better/more standard define to use for
>  those sort of debugging messages?

I found this VERY useful when dealing with code paths not working the way I 
wanted. Admittedly this was because the PerlKDE3 code is missing a number of 
important classes (KXMLGuiFactory for one....), but this was very handy in 
being able to access the call stack during development of an app.

With regard to what would be "better" would imo, to change that from having to 
import a whole new module to activate it to changing it to be a configuration 
option to the main module as it's being used:

use Qt qw(debug: CHANNEL);

This way Qt::debug could be redone so it can be used to register new debug 
CHANNELS for the app. This also fits better with a number of modules out there 
that do much the same re the use of the use parameter for loading modules.

Just my $0.02

> 
> --Chris
> _______________________________________________
> Kde-perl mailing list
> Kde-perl at kde.org
> https://mail.kde.org/mailman/listinfo/kde-perl
> 



More information about the Kde-perl mailing list