0027291: Command File->New crashes Import Export Qt sample on Linux
authorski <ski@opencascade.com>
Fri, 25 Mar 2016 09:34:28 +0000 (12:34 +0300)
committerbugmaster <bugmaster@opencascade.com>
Tue, 29 Mar 2016 12:52:28 +0000 (15:52 +0300)
Crash on Qt 4.8.6 was fixed.

samples/qt/Common/src/View.cxx

index 08c8db6..4ba33bf 100755 (executable)
 #include <QRubberBand>
 #include <QMdiSubWindow>
 #include <QStyleFactory>
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && QT_VERSION < 0x050000
+  #include <QX11Info>
+#endif
+
 
 #include <Graphic3d_ExportFormat.hxx>
 #include <Graphic3d_GraphicDriver.hxx>
@@ -50,6 +54,9 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
   myRaytraceActions( 0 ),
   myBackMenu( NULL )
 {
+#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && QT_VERSION < 0x050000
+  XSynchronize(x11Info().display(),true);
+#endif
   myContext = theContext;
 
   myXmin = 0;