Salome HOME
Merge branch 'V8_2_BR'
authorrnv <rnv@opencascade.com>
Thu, 15 Dec 2016 07:49:09 +0000 (10:49 +0300)
committerrnv <rnv@opencascade.com>
Thu, 15 Dec 2016 08:03:09 +0000 (11:03 +0300)
CMakeLists.txt
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_MimeData.cxx
src/Qtx/QtxWebBrowser.cxx
src/SUIT/SUIT_FileValidator.h
src/VTKViewer/VTKViewer_GeometryFilter.cxx
src/VTKViewer/VTKViewer_PolyDataMapper.cxx
tools/PyEditor/src/PyEditor_Settings.h

index 903049a7ee3877962043fa3c9a673c8111fa9e51..326b619861585ac0bcdfb922e061acb4f5899fc5 100755 (executable)
@@ -37,7 +37,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
 # Common CMake macros
 # ===================
index 0a45bb38a9a07905640c1a984f86fa822abe6425..cf12ae7ba5d29b1c5520cba1e17c03af4f09be15 100644 (file)
@@ -1096,7 +1096,7 @@ GLboolean GLViewer_Polyline::select( GLfloat x, GLfloat y, GLfloat tol, GLViewer
     GLfloat xa, xb, ya, yb, l;
     GLfloat rsin, rcos, r, ra, rb;
     // GLboolean update;
-    GLboolean selected = myIsSel;
+    // GLboolean selected = myIsSel;
 
     myIsSel = GL_FALSE;
 
index 73fee04129e7699bf2650c334eb88a6534927b45..2b54084672420b70ebd198df14efbc798d8b96e3 100644 (file)
@@ -235,8 +235,8 @@ const char* GLViewer_MimeData::format( int theIndex ) const
 */
 QByteArray GLViewer_MimeData::encodedData( const char* theObjectType ) const
 {
-    if( theObjectType == "GLViewer_Objects" )
-        return myByteArray;
-    
-    return QByteArray();
+  if ( theObjectType && strcmp( theObjectType, "GLViewer_Objects" ) == 0 )
+    return myByteArray;
+
+  return QByteArray();
 }
index 48991f6bed956cfed255f41a4c053646e577b039..3141d68be296b4ab861f6c1bb142169a489fa940 100644 (file)
@@ -119,7 +119,9 @@ bool QtxWebBrowser::Searcher::find( const QString& text, QtxSearchTool* st )
   if ( st->isSearchWrapped() ) fl = fl | WebPage::FindWrapsAroundDocument;
   return myView->findText( text, fl );
 #else
-  myView->findText( text, fl, [this](bool found) { return found; });  
+  bool textFound;
+  myView->findText( text, fl, [&](bool found) { textFound = found; });
+  return textFound;
 #endif    
 }
 
@@ -150,7 +152,9 @@ bool QtxWebBrowser::Searcher::findPrevious( const QString& text, QtxSearchTool*
   if ( st->isSearchWrapped() ) fl = fl | WebPage::FindWrapsAroundDocument;
   return myView->findText( text, fl );
 #else
-  myView->findText( text, fl, [this](bool found) { return found; });
+  bool textFound;
+  myView->findText( text, fl, [&](bool found) { textFound = found; });
+  return textFound;
 #endif 
 }
 
@@ -222,10 +226,10 @@ QtxWebBrowser::Downloader::Downloader( const QString& fileName, int action, cons
 
   QGridLayout* l = new QGridLayout( this );
   l->addWidget( new QLabel( QtxWebBrowser::tr( "You are opening the file" ), this ), 
-                           0, 0, 1, 4 );
+                            0, 0, 1, 4 );
   l->addWidget( myFileName, 1, 1, 1, 3 );
   l->addWidget( new QLabel( QtxWebBrowser::tr( "Please choose the action to be done" ), this ), 
-                           3, 0, 1, 4 );
+                            3, 0, 1, 4 );
   l->addWidget( rbOpen,     4, 1, 1, 1 );
   l->addWidget( myBrowse,   4, 2, 1, 1 );
   l->addWidget( rbSave,     5, 1, 1, 3 );
@@ -367,11 +371,11 @@ QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 )
   
   myFindPanel = new QtxSearchTool( frame, myWebView,
 #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
-                                  QtxSearchTool::Basic | QtxSearchTool::Case | QtxSearchTool::Wrap,
+                                   QtxSearchTool::Basic | QtxSearchTool::Case | QtxSearchTool::Wrap,
 #else
-                                  QtxSearchTool::Basic | QtxSearchTool::Case,
-#endif                            
-                                  Qt::Horizontal );
+                                   QtxSearchTool::Basic | QtxSearchTool::Case,
+#endif                             
+                                   Qt::Horizontal );
   myFindPanel->setFrameStyle( QFrame::NoFrame | QFrame::Plain );
   myFindPanel->setActivators( QtxSearchTool::SlashKey );
   myFindPanel->setSearcher( new Searcher( myWebView ) );
@@ -384,29 +388,29 @@ QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 )
 
   QMenu* fileMenu = menuBar()->addMenu( tr( "&File" ) );
   fileMenu->addAction( QPixmap( ":/images/open.png" ), tr( "&Open..." ), 
-                      this, SLOT( open() ),
-                      QKeySequence( QKeySequence::Open ) );
+                       this, SLOT( open() ),
+                       QKeySequence( QKeySequence::Open ) );
   fileMenu->addSeparator();
   fileMenu->addAction( myWebView->pageAction( WebPage::Back ) );
   fileMenu->addAction( myWebView->pageAction( WebPage::Forward ) );
   fileMenu->addAction( myWebView->pageAction( WebPage::Reload ) );
   fileMenu->addSeparator();
   fileMenu->addAction( tr( "&Find in text..." ),
-                      myFindPanel, SLOT( find() ),
-                      QKeySequence( QKeySequence::Find ) );
+                       myFindPanel, SLOT( find() ),
+                       QKeySequence( QKeySequence::Find ) );
   fileMenu->addAction( tr( "&Find next" ),
-                      myFindPanel, SLOT( findNext() ),
-                      QKeySequence( QKeySequence::FindNext ) );
+                       myFindPanel, SLOT( findNext() ),
+                       QKeySequence( QKeySequence::FindNext ) );
   fileMenu->addAction( tr( "&Find previous" ),
-                      myFindPanel, SLOT( findPrevious() ),
-                      QKeySequence( QKeySequence::FindPrevious ) );
+                       myFindPanel, SLOT( findPrevious() ),
+                       QKeySequence( QKeySequence::FindPrevious ) );
   fileMenu->addSeparator();
   fileMenu->addAction( QPixmap( ":/images/close.png" ), tr( "&Close" ),
-                      this, SLOT( close() ) );
+                       this, SLOT( close() ) );
 
   QMenu* helpMenu = menuBar()->addMenu( tr( "&Help" ) );
   helpMenu->addAction( tr( "&About..." ),
-                      this, SLOT( about() ) );
+                       this, SLOT( about() ) );
   
   QVBoxLayout* main = new QVBoxLayout( frame );
   main->addWidget( myWebView );
@@ -418,22 +422,22 @@ QtxWebBrowser::QtxWebBrowser( ) : QMainWindow( 0 )
   connect( myWebView, SIGNAL( loadFinished( bool ) ),    SLOT( finished( bool ) ) );
   
   connect( myWebView->pageAction( WebPage::DownloadLinkToDisk ), SIGNAL( triggered() ),
-          SLOT( linkAction() ) );
+           SLOT( linkAction() ) );
 #if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
   //QtWebKit case:
   connect( myWebView, SIGNAL( linkClicked( QUrl ) ),     SLOT( linkClicked( QUrl ) ) );
   connect( myWebView->page(), SIGNAL( linkHovered( QString, QString, QString ) ), 
-          SLOT( linkHovered( QString, QString, QString ) ) ); 
+           SLOT( linkHovered( QString, QString, QString ) ) ); 
   disconnect( myWebView->pageAction( WebPage::OpenLink ), 0, 0, 0 );
   connect( myWebView->pageAction( WebPage::OpenLink ), SIGNAL( triggered() ),
-          SLOT( linkAction() ) );
+           SLOT( linkAction() ) );
 #else
   //QtWebEngine (Qt-5.6.0) case:
   connect( myWebView->page(), SIGNAL( linkHovered( QString ) ), 
-          SLOT( linkHovered( QString ) ) );
+           SLOT( linkHovered( QString ) ) );
   disconnect( myWebView->pageAction( WebPage::OpenLinkInThisWindow ), 0, 0, 0 );
   connect( myWebView->pageAction( WebPage::OpenLinkInThisWindow ), SIGNAL( triggered() ),
-          SLOT( linkAction() ) );
+           SLOT( linkAction() ) );
 #endif  
   setCentralWidget( frame );
   setFocusProxy( myWebView );
@@ -513,7 +517,7 @@ QtxResourceMgr* QtxWebBrowser::resourceMgr() const
 void QtxWebBrowser::about()
 {
   QMessageBox::about( this, tr( "About %1" ).arg( tr( "Help Browser" ) ),
-                     QString( "SALOME %1" ).arg( tr( "Help Browser" ) ) );
+                      QString( "SALOME %1" ).arg( tr( "Help Browser" ) ) );
 }
 
 /*!
@@ -636,7 +640,7 @@ void QtxWebBrowser::openLink( const QString& fileName, bool force )
       myResourceMgr->setValue( resSection, actionParam, defAction );
       myResourceMgr->setValue( resSection, repeatParam, defRepeat );
       if ( defAction == Downloader::mOpen )
-       myResourceMgr->setValue( resSection, programParam, defProgram );
+        myResourceMgr->setValue( resSection, programParam, defProgram );
     }
   }
   switch( defAction ) {
@@ -689,12 +693,13 @@ void QtxWebBrowser::load( const QString& link )
 void QtxWebBrowser::saveLink( const QString& fileName )
 {
   QString newFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), fileName, 
-                                                     QString( "*.%1" ).arg( QFileInfo( fileName ).suffix() ) );
+                                                      QString( "*.%1" ).arg( QFileInfo( fileName ).suffix() ) );
   if ( !newFileName.isEmpty() && 
        QFileInfo( newFileName ).canonicalFilePath() != QFileInfo( fileName ).canonicalFilePath() ) {
     QFile toFile( newFileName );
     QFile fromFile( fileName );
-    if ( toFile.exists() && !toFile.remove() || !fromFile.copy( newFileName ) )
+    if (( toFile.exists() && !toFile.remove() ) ||
+        ( !fromFile.copy( newFileName ) ))
       QMessageBox::warning( this, tr( "Error"), tr( "Can't save file:\n%1" ).arg( newFileName ) );
   }
 }
index f8506842d81891b37c24e7fccce02975da4c4f6f..c4ffd66159eb63a5bec52a84f91142710d1d825e 100755 (executable)
@@ -33,9 +33,10 @@ class QString;
 
 class SUIT_EXPORT SUIT_FileValidator
 {
-public:
+ public:
   SUIT_FileValidator( QWidget* = 0 );
-  
+  virtual ~SUIT_FileValidator() {}
+
   virtual bool    canOpen( const QString&, bool = true );
   virtual bool    canSave( const QString&, bool = true );
 
index 237adfb6c4611a18f907a79230ea386ae266b856..a289dc87c2ac60cfe4457e5538e55e3e48d0eca7 100755 (executable)
@@ -1146,9 +1146,9 @@ VTKViewer_GeometryFilter
                         // avoid adding it when treating another face
                         process = midPoints.insert( face->GetPointId(p2) ).second; break;
                       case 1: // the edge is shared by two cells
-                        process = ( cellIdsTmp->GetId(0) == cellId ); break;
+                        process = ( cellIdsTmp->GetId(0) < cellId ); break;
                       default: // the edge is shared by >2 cells
-                        process = ( cellIdsTmp->GetId(0) != cellId ); break;
+                        process = ( cellIdsTmp->GetId(0) < cellId ); break;
                       }
                       if ( process )
                       {
index d34ea33c38032f3679ef0ac48b241b66eb5096e0..7dca2f88de49c9843f216c941c9a914af6c4801e 100644 (file)
@@ -593,6 +593,8 @@ namespace VTK
     virtual
     void
     get( TVertex& theVertex, vtkIdType thePointId, vtkIdType theCellId ) = 0;
+
+    virtual ~TColorFunctorBase() {}
   };
 
   //-----------------------------------------------------------------------------
index 2f1c9be6c00206b18cc9e09acbe18efc058dd747..aa6de041985d28231a8c35dc462622eb299de966 100644 (file)
@@ -31,21 +31,22 @@ class PYEDITOR_EXPORT PyEditor_Settings
 {
 protected:
   enum Option { snEditor, 
-               snHighlightCurrentLine,
-               snTextWrapping,
-               snCenterCursorOnScroll,
-               snLineNumberArea,
-               snVerticalEdge,
-               snNumberColumns,
-               snTabSpaceVisible,
-               snTabSize,
-               snFont };
+                snHighlightCurrentLine,
+                snTextWrapping,
+                snCenterCursorOnScroll,
+                snLineNumberArea,
+                snVerticalEdge,
+                snNumberColumns,
+                snTabSpaceVisible,
+                snTabSize,
+                snFont };
 
 public:
   static PyEditor_Settings* settings();
   static void setSettings( PyEditor_Settings* );
   
   PyEditor_Settings();
+  virtual ~PyEditor_Settings() {}
 
   void setHighlightCurrentLine( bool );
   bool highlightCurrentLine() const;