diff options
Diffstat (limited to 'pyuic3')
-rw-r--r-- | pyuic3/embed.cpp | 2 | ||||
-rw-r--r-- | pyuic3/form.cpp | 2 | ||||
-rw-r--r-- | pyuic3/main.cpp | 4 | ||||
-rw-r--r-- | pyuic3/object.cpp | 4 | ||||
-rw-r--r-- | pyuic3/parser.cpp | 2 | ||||
-rw-r--r-- | pyuic3/subclassing.cpp | 2 | ||||
-rw-r--r-- | pyuic3/uic.cpp | 4 |
7 files changed, 10 insertions, 10 deletions
diff --git a/pyuic3/embed.cpp b/pyuic3/embed.cpp index 3a66de3..c54104f 100644 --- a/pyuic3/embed.cpp +++ b/pyuic3/embed.cpp @@ -149,7 +149,7 @@ void Uic::embed( TQTextStream& out, const char* project, const TQStringList& ima for ( it = images.begin(); it != images.end(); ++it ) { TQImage img; if ( !img.load( *it ) ) { - fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).latin1() ); + fprintf( stderr, "pyuic: cannot load image file %s\n", (*it).utf8() ); continue; } EmbedImage *e = new EmbedImage; diff --git a/pyuic3/form.cpp b/pyuic3/form.cpp index 752c281..8c7a374 100644 --- a/pyuic3/form.cpp +++ b/pyuic3/form.cpp @@ -877,7 +877,7 @@ void Uic::createFormImpl( const TQDomElement &e ) out << endl; ++indent; if ( *cit != "init()" && *cit != "destroy()" ) - out << indent << "print \"" << nameOfClass << "." << (*cit) << ": Not implemented yet\"" << endl; + out << indent << "print(\"" << nameOfClass << "." << (*cit) << ": Not implemented yet\")" << endl; else out << indent << "pass" << endl; --indent; diff --git a/pyuic3/main.cpp b/pyuic3/main.cpp index 43c9d7b..e54000c 100644 --- a/pyuic3/main.cpp +++ b/pyuic3/main.cpp @@ -172,7 +172,7 @@ int main( int argc, char * argv[] ) TQTextStream out( &fileOut ); if ( imagecollection ) { - out.setEncoding( TQTextStream::Latin1 ); + out.setEncoding( TQTextStream::UnicodeUTF8 ); out << "# -*- coding: latin-1 -*-\n\n"; Uic::embed( out, projectName, images ); return 0; @@ -193,7 +193,7 @@ int main( int argc, char * argv[] ) TQDomElement e = doc.firstChild().toElement(); if ( e.hasAttribute("version") && e.attribute("version").toDouble() > 3.3 ) { tqWarning( TQString("pyuic: File generated with too recent version of TQt Designer (%s vs. %s)"), - e.attribute("version").latin1(), TQT_VERSION_STR ); + e.attribute("version").utf8(), TQT_VERSION_STR ); return 1; } diff --git a/pyuic3/object.cpp b/pyuic3/object.cpp index 5ee2b73..1b7232f 100644 --- a/pyuic3/object.cpp +++ b/pyuic3/object.cpp @@ -247,7 +247,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla TQString page = createObjectImpl( n, objClass, fullObjName ); TQString comment; TQString label = DomTool::readAttribute( n, "title", "", comment ).toString(); - out << indent << fullObjName << ".insertTab(" << page << ",TQString.fromLatin1(\"\"))" << endl; + out << indent << fullObjName << ".insertTab(" << page << ",TQString.fromUtf8(\"\"))" << endl; trout << trindent << fullObjName << ".changeTab(" << page << "," << trcall( label, comment ) << ")" << endl; } } @@ -265,7 +265,7 @@ TQString Uic::createObjectImpl( const TQDomElement &e, const TQString& parentCla TQString page = createObjectImpl( n, objClass, fullObjName ); TQString comment; TQString label = DomTool::readAttribute( n, "label", "", comment ).toString(); - out << indent << fullObjName << ".addItem(" << page << ",TQString.fromLatin1(\"\"))" << endl; + out << indent << fullObjName << ".addItem(" << page << ",TQString.fromUtf8(\"\"))" << endl; trout << trindent << fullObjName << ".setItemLabel(" << fullObjName << ".indexOf(" << page << ")," << trcall( label, comment ) << ")" << endl; diff --git a/pyuic3/parser.cpp b/pyuic3/parser.cpp index 85446fa..fc6aae4 100644 --- a/pyuic3/parser.cpp +++ b/pyuic3/parser.cpp @@ -62,5 +62,5 @@ TQString Parser::cleanArgs( const TQString &func ) } res += ")"; - return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) ); + return TQString::fromUtf8( NormalizeObject::normalizeSignalSlot( res.utf8() ) ); } diff --git a/pyuic3/subclassing.cpp b/pyuic3/subclassing.cpp index 143a27a..9cb1ee1 100644 --- a/pyuic3/subclassing.cpp +++ b/pyuic3/subclassing.cpp @@ -178,7 +178,7 @@ void Uic::writeFunctionsSubImpl( const TQStringList &fuLst, const TQStringList & pySlot(it); ++indent; out << endl; - out << indent << "print \"" << subClass << "." << (*it) << ": Not implemented yet\"" << endl; + out << indent << "print(\"" << subClass << "." << (*it) << ": Not implemented yet\")" << endl; --indent; } out << endl; diff --git a/pyuic3/uic.cpp b/pyuic3/uic.cpp index ac6af9b..8d0613c 100644 --- a/pyuic3/uic.cpp +++ b/pyuic3/uic.cpp @@ -249,7 +249,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, out << "\n"; out << indent << "def __tr(self,s,c = None):\n"; ++indent; - out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c)\n"; + out << indent << "return tqApp.translate(b\"" << nameOfClass << "\",s.encode(),c)\n"; --indent; } @@ -258,7 +258,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, out << "\n"; out << indent << "def __trUtf8(self,s,c = None):\n"; ++indent; - out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c,TQApplication.UnicodeUTF8)\n"; + out << indent << "return tqApp.translate(b\"" << nameOfClass << "\",s.encode(),c,TQApplication.UnicodeUTF8)\n"; --indent; } |