From 518c8974a6ce92a1a1e627690fe287c19a03a95f Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 18 Nov 2010 22:14:49 +0000 Subject: [PATCH] Add error message when using a Qt compiled with QT_NO_SESSIONMANAGER defined. The error message that QSessionManager is incomplete is not very useful to find out the problem. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36388 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiApplication.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp index 358386456b..1f001a55fd 100644 --- a/src/frontends/qt4/GuiApplication.cpp +++ b/src/frontends/qt4/GuiApplication.cpp @@ -2268,8 +2268,14 @@ void GuiApplication::commitData(QSessionManager & sm) /// interaction. /// We are changing that to close all wiew one by one. /// FIXME: verify if the default implementation is enough now. - if (sm.allowsInteraction() && !closeAllViews()) - sm.cancel(); + + #ifdef QT_NO_SESSIONMANAGER + #error Qt is compiled without session manager + (void) sm; + #else + if (sm.allowsInteraction() && !closeAllViews()) + sm.cancel(); + #endif } -- 2.39.2