Hi,

I got hit by bug http://bugs.gentoo.org/show_bug.cgi?id=212086. It
needed some time of googling to find out what the problem was, as the
error message is not very informative:

error: invalid use of undefined type 'struct QSessionManager'
/usr/include/qt4/QtGui/qapplication.h:63: error: forward declaration of 'struct
QSessionManager'


Anyone against adding this error message ?

Index: src/frontends/qt4/GuiApplication.cpp
===================================================================
--- src/frontends/qt4/GuiApplication.cpp        (revision 36264)
+++ src/frontends/qt4/GuiApplication.cpp        (working copy)
@@ -2268,8 +2268,14 @@
        /// 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, please
recompile Qt
+               (void) sm;
+       #else
+               if (sm.allowsInteraction() && !closeAllViews())
+                       sm.cancel();
+       #endif
 }

Vincent

Reply via email to