From 639abeae66b95f03f6d3f5891c4d096561de2e77 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 4 Jul 2008 10:16:54 +0000 Subject: [PATCH] Work around bug http://bugzilla.lyx.org/show_bug.cgi?id=4846 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25440 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index ec4784c55c..f1bbad25e3 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -629,9 +629,7 @@ struct GuiApplication::Private #ifdef Q_WS_WIN /// WMF Mime handler for Windows clipboard. - // FIXME for Windows Vista and Qt4 (see http://bugzilla.lyx.org/show_bug.cgi?id=4846) - // But this makes LyX crash on exit when LyX is compiled in release mode and if there - // is something in the clipboard. + /// \warning: see comment in ~GuiApplication and in bug 4846. QWindowsMimeMetafile wmf_mime_; #endif }; @@ -644,6 +642,13 @@ GuiApplication::~GuiApplication() #ifdef Q_WS_MACX closeAllLinkBackLinks(); #endif + // FIXME: Work around bug 4846 for Windows Vista and Qt4 + // (see http://bugzilla.lyx.org/show_bug.cgi?id=4846) + // If the clipboard is not cleared, LyX crashes on exit when it is + // compiled in release mode and if there is something in the clipboard. + // This is related to QWindowsMimeMetafile which is apparently not + // properly destroyed. + qApp->clipboard()->clear(QClipboard::Clipboard); delete d; } -- 2.39.2