From b486b53f8f2806579a9eb12531f7c33a7b881fab Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 1 Sep 2006 13:49:03 +0000 Subject: [PATCH] Patch from Enrico: Avoids the crash when quitting LyX on Cygwin/qt4 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14860 a592a061-630c-0410-9148-cb99ea01b6c8 --- config/qt4.m4 | 4 ++++ src/frontends/qt4/lyx_gui.C | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/qt4.m4 b/config/qt4.m4 index 6c98da65cf..098845f8ba 100644 --- a/config/qt4.m4 +++ b/config/qt4.m4 @@ -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) diff --git a/src/frontends/qt4/lyx_gui.C b/src/frontends/qt4/lyx_gui.C index 0dd4e56ba5..1aa7d1c21f 100644 --- a/src/frontends/qt4/lyx_gui.C +++ b/src/frontends/qt4/lyx_gui.C @@ -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);