Re: Two small problems with puic (hand corrected)

Germain Garand <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
Le Samedi 21 Août 2004 10:20, Alain EMPAIN a écrit :
> 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 :
>

thanks for the bug report and analysis,
those two bugs are now fixed in CVS.

cf. attached patches.

Greetings,
Germain

_______________________________________________
Kde-perl mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-perl
main.cpp.diff (text/x-diff, 663 B)
Index: main.cpp
===================================================================
RCS file: /cvsroot/perlqt/PerlQt-3/puic/main.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -p -r1.16 -r1.17
--- main.cpp	19 Dec 2003 03:53:21 -0000	1.16
+++ main.cpp	25 Aug 2004 08:19:18 -0000	1.17
@@ -237,7 +237,6 @@ int main( int argc, char * argv[] )
     if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.2 ) {
 	qWarning( QString("puic: File generated with too recent version of Qt Designer (%s). Recent extensions won't be handled."),
 		  e.attribute("version").latin1() );
-	return 1;
     }
 
     DomTool::fixDocument( doc );
object.cpp.diff (text/x-diff, 1.1 KB)
Index: object.cpp
===================================================================
RCS file: /cvsroot/perlqt/PerlQt-3/puic/object.cpp,v
retrieving revision 1.7
diff -u -3 -p -r1.7 object.cpp
--- object.cpp	14 Aug 2003 17:35:40 -0000	1.7
+++ object.cpp	25 Aug 2004 08:42:32 -0000
@@ -626,14 +626,14 @@ QString Uic::setObjectProperty( const QS
 	    v = v.arg( pal.active().button().red() ).arg( pal.active().button().green() ).arg( pal.active().button().blue() );
 	    v = v.arg( pal.active().background().red() ).arg( pal.active().background().green() ).arg( pal.active().background().blue() );
 	} else {
-	    QString palette = "pal";
+	    QString palette = "$pal";
 	    if ( !pal_used ) {
-		out << indent << palette << " = Qt::Palette();" << endl;
+		out << indent << "my " << palette << " = Qt::Palette();" << endl;
 		pal_used = TRUE;
 	    }
-	    QString cg = "cg";
+	    QString cg = "$cg";
 	    if ( !cg_used ) {
-		out << indent << cg << " = Qt::ColorGroup();" << endl;
+		out << indent << "my " << cg << " = Qt::ColorGroup();" << endl;
 		cg_used = TRUE;
 	    }
 	    n = e.firstChild().toElement();
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.