From: vsr Date: Wed, 18 Jun 2014 08:33:29 +0000 (+0400) Subject: Unicode support X-Git-Tag: V7_5_0a1~43 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3f411740f2fda2fcc5632a43d47c69339e0df7b7;p=modules%2Fgui.git Unicode support --- diff --git a/src/PyConsole/PyConsole_Editor.cxx b/src/PyConsole/PyConsole_Editor.cxx index adb5a6d7a..09a345540 100644 --- a/src/PyConsole/PyConsole_Editor.cxx +++ b/src/PyConsole/PyConsole_Editor.cxx @@ -139,13 +139,13 @@ bool DumpCommandsFileValidator::canSave(const QString& file, bool permissions) void staticCallbackStdout( void* data, char* c ) { if(!((PyConsole_Editor*)data)->isSuppressOutput()) - QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( c, false ) ); + QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( QString::fromUtf8(c), false ) ); } void staticCallbackStderr( void* data, char* c ) { if(!((PyConsole_Editor*)data)->isSuppressOutput()) - QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( c, true ) ); + QApplication::postEvent( (PyConsole_Editor*)data, new PrintEvent( QString::fromUtf8(c), true ) ); } diff --git a/src/PyConsole/PyConsole_Event.h b/src/PyConsole/PyConsole_Event.h index 0db05600e..be9c15869 100644 --- a/src/PyConsole/PyConsole_Event.h +++ b/src/PyConsole/PyConsole_Event.h @@ -44,7 +44,7 @@ public: \param c message text (python trace) \param isError default to false - if true indicates that an error is being printed. */ - PrintEvent( const char* c, bool isError = false) : + PrintEvent( const QString& c, bool isError = false) : QEvent( (QEvent::Type)EVENT_ID ), myText( c ), errorFlag(isError) {}