From: Vincent van Ravesteijn Date: Thu, 18 Nov 2010 22:14:49 +0000 (+0000) Subject: Add error message when using a Qt compiled with QT_NO_SESSIONMANAGER defined. The... X-Git-Tag: 2.0.0~1778 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=518c8974a6ce92a1a1e627690fe287c19a03a95f;p=features.git 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 --- 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 }