Salome HOME
Updated copyright comment
[modules/gui.git] / src / GLViewer / GLViewer_Widget.cxx
index ac60a1f8d2f05ba161db20b654da06ffa8b502de..e01435daabbacf50456f84939f74b4ef14e519f8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -41,7 +41,7 @@
   A constructor
   Parameters using for QOGLWidget as is 
 */
-GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* name ):
+GLViewer_Widget::GLViewer_Widget( QWidget* parent, const char* /*name*/ ):
 QGLWidget( parent, 0/*, WRepaintNoErase | WResizeNoErase*/ )
 {
   myViewPort = ( GLViewer_ViewPort2d* )parent;
@@ -265,7 +265,7 @@ void GLViewer_Widget::initializeGL()
     
     //get image
     QImage buf; 
-    QString aPicturePath = getenv("GLViewer__Background_Picture");
+    QString aPicturePath = Qtx::getenv("GLViewer__Background_Picture");
     
     if ( !aPicturePath.isEmpty() && buf.load( aPicturePath ) ) 
     {  // Load first image from file
@@ -401,7 +401,7 @@ void GLViewer_Widget::mouseReleaseEvent( QMouseEvent* e )
 /*!
   Custom enter event handler
 */
-void GLViewer_Widget::enterEvent( QEvent* e )
+void GLViewer_Widget::enterEvent( QEvent* /*e*/ )
 {
   updateGL();
 }
@@ -409,7 +409,7 @@ void GLViewer_Widget::enterEvent( QEvent* e )
 /*!
   Custom leave event handler
 */
-void GLViewer_Widget::leaveEvent( QEvent* e )
+void GLViewer_Widget::leaveEvent( QEvent* /*e*/ )
 {
   updateGL();
 }
@@ -495,7 +495,7 @@ void AddImagePart( QFile& hFile, QImage& image, int w1, int w2, int h1, int h2,
     
     aBuffer += "> false 3 colorimage\n\n";
 
-    hFile.write( aBuffer.toAscii() );
+    hFile.write( aBuffer.toLatin1() );
   }
 }
 
@@ -579,7 +579,7 @@ typedef unsigned int WORD;
         memcpy( dest, source, aSize/8 );
     else
     {
-        double r, g, b; WORD color;
+        double r=0, g=0, b=0; WORD color;
         for( int i=0; i<width; i++ )
         {
             color = 0;