On Thu, Aug 24, 2006 at 06:47:22PM +0200, Abdelrazak Younes wrote:

> Enrico Forestieri wrote:
> > I have compiled a Cygwin version of LyX/Qt4 using the native GUI (no X11)
> > and now I see the chinese characters mentioned by Abdel when I load
> > an old document. I also get a lot of messages on the console:
> > 
> > Error returned from iconv
> > EILSEQ An invalid multibyte sequence has been encountered in the input.
> > When converting from UCS-4 to UCS-2.
> > Input: 0xff 0xff 0xff 0xa2 
> > 
> > This was not the case with Qt3 where the characters were simply hollow
> > squares on screen. However, when I start a new document the characters
> > are shown correctly.
> 
> The attached patch at least make LyX show normal text correctly.
> 
> > LyX also crashes when quitting, but I don't know if this is related to
> > the patches I applied to Qt4 or if it is a LyX problem. Anyway, all
> > Qt4 examples compile and run just fine.
> 
> Backtrace?

The attached patch avoids the crash when quitting LyX.

-- 
Enrico
Index: src/frontends/qt4/lyx_gui.C
===================================================================
--- src/frontends/qt4/lyx_gui.C (revision 14845)
+++ src/frontends/qt4/lyx_gui.C (working copy)
@@ -129,7 +129,7 @@ int exec(int & argc, char * argv[])
        // Force adding of font path _before_ QApplication is initialized
        FontLoader::initFontPath();
 
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN) && !defined(Q_CYGWIN_WIN)
        static Application app(argc, argv);
 #else
        Application app(argc, argv);
Index: config/qt4.m4
===================================================================
--- config/qt4.m4       (revision 14845)
+++ config/qt4.m4       (working copy)
@@ -118,6 +118,10 @@ AC_DEFUN([QT4_DO_IT_ALL],
        QT4_CPPFLAGS="-DQT_CLEAN_NAMESPACE -DQT_GENUINE_STR -DQT_NO_STL 
-DQT_NO_KEYWORDS"
        case ${host} in
        *mingw*) QT4_CPPFLAGS="-DQT_DLL $QT4_CPPFLAGS";;
+       *cygwin*)
+       if test "x$with_x" = xno ; then
+               QT4_CPPFLAGS="$QT4_CPPFLAGS -DQ_CYGWIN_WIN"
+       fi;;
        esac
        AC_SUBST(QT4_CPPFLAGS)
 

Reply via email to