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

List:       kde-core-devel
Subject:    problems with am_edit
From:       Alessandro Praduroux <pradu () thekompany ! com>
Date:       2002-02-15 16:42:06
[Download RAW message or body]

Hi all, 

I'm porting an app from KDE2 to KDE3, and I've found a problem with am_edit 
(current CVS version)
When generating implementation files from qt2 .ui files, in presence of empty 
translated strings I got a compiler error in the generated file:

filtereditdialogbase.cpp: In method 
`FilterEditDialogBase::FilterEditDialogBase(QWidget * = 0, const char * = 0, 
bool = FALSE, unsigned int = 0)':
filtereditdialogbase.cpp:41: `tr2QString' undeclared (first use this function)
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 makefiles:
/opt/qt3/bin/uic -L /opt/kde3/lib/kde3/plugins/designer -nounload -tr tr2i18n 
-i sfiledialogbase.h ./sfiledialogbase.ui | sed -e "s,i18n( \"\" 
),QString::null,g" | sed -e "s,QT_KDE_I18N( \"\"\, \"\" ),QString::null,g" >> 
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 the 
most correct way to do it.

Plase review.

-- 
Pradu
-----------------------------------------
Alessandro Praduroux
pradu@thekompany.com
http://www.thekompany.com


["am_edit.diff" (text/x-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 <klocale.h>' > \
                $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";  }



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

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