From kde-core-devel Fri Feb 15 16:42:06 2002 From: Alessandro Praduroux Date: Fri, 15 Feb 2002 16:42:06 +0000 To: kde-core-devel Subject: problems with am_edit X-MARC-Message: https://marc.info/?l=kde-core-devel&m=101379147630144 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------Boundary-00=_6E2L3X2JL2FYKVPRA15X" --------------Boundary-00=_6E2L3X2JL2FYKVPRA15X Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all,=20 I'm porting an app from KDE2 to KDE3, and I've found a problem with am_ed= it=20 (current CVS version) When generating implementation files from qt2 .ui files, in presence of e= mpty=20 translated strings I got a compiler error in the generated file: filtereditdialogbase.cpp: In method=20 `FilterEditDialogBase::FilterEditDialogBase(QWidget * =3D 0, const char *= =3D 0,=20 bool =3D FALSE, unsigned int =3D 0)': filtereditdialogbase.cpp:41: `tr2QString' undeclared (first use this func= tion) filtereditdialogbase.cpp:41: (Each undeclared identifier is reported only= once filtereditdialogbase.cpp:41: for each function it appears in.) that was due to a strange sed command generated by am_edit in my makefile= s: /opt/qt3/bin/uic -L /opt/kde3/lib/kde3/plugins/designer -nounload -tr tr2= i18n=20 -i sfiledialogbase.h ./sfiledialogbase.ui | sed -e "s,i18n( \"\"=20 ),QString::null,g" | sed -e "s,QT_KDE_I18N( \"\"\, \"\" ),QString::null,g= " >>=20 sfiledialogbase.cpp || rm -f sfiledialogbase.cpp (note the s,i18n(, that should be s,tr2i18n( really. The attached patch fixed it for me, but I'm not really sure if this is th= e=20 most correct way to do it. Plase review. --=20 Pradu ----------------------------------------- Alessandro Praduroux pradu@thekompany.com http://www.thekompany.com --------------Boundary-00=_6E2L3X2JL2FYKVPRA15X Content-Type: text/x-diff; charset="us-ascii"; name="am_edit.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="am_edit.diff" Index: am_edit =================================================================== RCS file: /home/kde/kde-common/admin/am_edit,v retrieving revision 1.300 diff -u -3 -p -r1.300 am_edit --- am_edit 2002/01/19 00:28:13 1.300 +++ am_edit 2002/02/15 16:35:16 @@ -1092,7 +1092,7 @@ sub tag_UIFILES () $dep_lines .= "\trm -f $source.$cxxsuffix\n"; if (!$kdeopts{"qtonly"}) { $dep_lines .= "\techo '#include ' > $source.$cxxsuffix\n"; - $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui | sed -e \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" | sed -e \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" >> $source.$cxxsuffix || rm -f $source.$cxxsuffix\n"; + $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui | sed -e \"s,\\\${UIC_TR}( \\\"\\\" ),QString::null,g\" | sed -e \"s,\\\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" >> $source.$cxxsuffix || rm -f $source.$cxxsuffix\n"; } else { $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix || rm -f $source.$cxxsuffix\n"; } --------------Boundary-00=_6E2L3X2JL2FYKVPRA15X--