Salome HOME
Redesign SALOME documentation: update link to youtube channel
[modules/gui.git] / src / Session / SALOME_Session_Server.cxx
index 021cc2643e035748ffef4c551dcd52e0c1f627f6..241423b8f0282d5cdb85371b26a6aaf63bdf1aa9 100755 (executable)
@@ -248,7 +248,7 @@ class SALOME_QApplication : public QApplication
 public:
   SALOME_QApplication( int& argc, char** argv )
 // TODO (QT5 PORTING) Below is a temporary solution, to allow compiling with Qt 5
-#if !defined WIN32 && QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+#if !defined(WIN32) && !defined(__APPLE__) && (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
   // san: Opening an X display and choosing a visual most suitable for 3D visualization
   // in order to make SALOME viewers work with non-native X servers
   : QApplication( (Display*)Qtx::getDisplay(), argc, argv, Qtx::getVisual() ),
@@ -366,6 +366,16 @@ int main( int argc, char **argv )
       QLocale::setDefault( QLocale::system() );
     }
   }
+  
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+
+  // RNV: setup the default format:
+  // QSurfaceFormat should be set before creation of QApplication,  
+  // so to avoid conflicts beetween SALOME and ParaView QSurfaceFormats we should merge theirs formats
+  // (see void Qtx::initDefaultSurfaceFormat()) and set the resultant format here.
+  Qtx::initDefaultSurfaceFormat(); 
+
+#endif
 
   // Create Qt application instance;
   // this should be done the very first!