Two small problems with puic (hand corrected)

Alain EMPAIN <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Organization University of LIEGE
Message-ID <[email protected]>
Hello,

I am developping with perl-Qt (Version : 3.008, release 118), 
designer/Qt 3.3.1 from SuSE 9.1.
puic is <PerlQt User Interface Compiler v0.70 for Qt version 3.3.1>

0/ When I run 'piuic -o ...' an error message says :
"puic: File generated with too recent version of Qt Designer (3.3). 
Recent extensions won't be handled."
No problem ;-)  : I edit the version 3.3 to 3.0, and it works.
I browsed for a newer version of puic, with no success.

1/ when I change the default font, or the palette with designer, puic is 
fooled.
Exploring why, I found that simply the new objects are not listed within 
the generated perl module Xxxx.pm :

----------------------
New generated intructions :
sub NEW
{
    shift->SUPER::NEW(@_[0..3]);
(...)
    pal = Qt::Palette();
    cg = Qt::ColorGroup();
    cg->setColor(&Qt::ColorGroup::Foreground, &black);
(...)
---------------------------
ERROR:
Can't modify constant item in scalar assignment
at Etpg.pm line 434, near ");"

434:     pal = Qt::Palette();
---------------------------
What to do : add pal and cg to Qt::attributes :

use Qt::attributes qw(
    pb_sel1
    ...
=> I added the lacking objects :
    pal
    cg
);

And with this simple correction, it gives a valid xxx.pm



Is it known stuffs, is there a recent, corrected puic ?

     Cheers,

    Alain

-- 
------------------------------------------------------------
Dr Alain EMPAIN  <[email protected]> <[email protected]>
      Bioinformatics, Molecular Genetics, 
      Fac. Med. Vet., University of Liège, Belgium
      Bd de Colonster, B43   B-4000 Liège (Sart-Tilman)
WORK: +32 4 366 3821  FAX: +32 4 366 4122
HOME: rue des Martyrs,7  B- 4550 Nandrin       
  +32 85 51 23 41  GSM: +32 497 70 17 64
--------------------------------------------------------------------------------
"I worry about my child and the Internet all the time, even though she's
too young to have logged on yet. Here's what I worry about. I worry that
10 or 15 years from now, she will come to me and say 'Daddy, where were
you when they took freedom of the press away from the Internet?'" 
--Mike Godwin, Electronic Frontier Foundation 
--------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.