From 6a83673baf709dd11b65940f943ea1332b0cc47a Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 24 Mar 2011 17:31:23 +0000 Subject: [PATCH] Remove warnings Untabify --- src/GLViewer/GLViewer_BaseObjects.cxx | 8 +- src/GLViewer/GLViewer_CoordSystem.cxx | 2 + src/LightApp/LightApp_Dialog.cxx | 2 + src/OCCViewer/OCCViewer_ViewPort.cxx | 291 +++++++++--------- src/PyConsole/PyConsole_Editor.cxx | 2 +- src/QDS/QDS_Datum.cxx | 2 +- src/Qtx/Qtx.cxx | 8 +- src/Qtx/QtxActionMenuMgr.cxx | 2 +- src/Qtx/QtxSearchTool.cxx | 4 +- src/SUIT/SUIT_FileDlg.cxx | 6 +- src/SUIT/SUIT_MessageBox.cxx | 4 +- src/SVTK/SALOME_Actor.cxx | 4 +- src/SVTK/SVTK_Trihedron.cxx | 2 + src/SVTK/SVTK_ViewModel.cxx | 6 +- .../SalomeApp_StudyPropertiesDlg.cxx | 2 +- src/Style/Style_Salome.cxx | 2 +- src/VTKViewer/VTKViewer_GeometryFilter.cxx | 14 +- src/VTKViewer/VTKViewer_MarkerWidget.cxx | 2 +- 18 files changed, 186 insertions(+), 177 deletions(-) diff --git a/src/GLViewer/GLViewer_BaseObjects.cxx b/src/GLViewer/GLViewer_BaseObjects.cxx index d0d117c21..3d3da6a25 100644 --- a/src/GLViewer/GLViewer_BaseObjects.cxx +++ b/src/GLViewer/GLViewer_BaseObjects.cxx @@ -374,8 +374,8 @@ GLboolean GLViewer_MarkerSet::highlight( GLfloat x, GLfloat y, GLfloat tol, GLbo ydist = ( myYCoord[i] - y ) * myYScale; // if ( isCircle && ( xdist * xdist + ydist * ydist <= radius * radius ) || - if ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) || - !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) + if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) || + ( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) ) { isFound = FALSE; count++; @@ -463,8 +463,8 @@ GLboolean GLViewer_MarkerSet::select( GLfloat x, GLfloat y, GLfloat tol, GLViewe ydist = ( myYCoord[i] - y ) * myYScale; //if ( isCircle && ( xdist * xdist + ydist * ydist <= radius * radius ) || - if ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) || - !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) + if ( ( isCircle && ( xdist * xdist + ydist * ydist <= myMarkerSize * myMarkerSize ) ) || + ( !isCircle && ( fabs( xdist ) <= radius && fabs( ydist ) <= radius ) ) ) { count++; if ( isShift ) diff --git a/src/GLViewer/GLViewer_CoordSystem.cxx b/src/GLViewer/GLViewer_CoordSystem.cxx index bfea22a16..cee8bdac3 100644 --- a/src/GLViewer/GLViewer_CoordSystem.cxx +++ b/src/GLViewer/GLViewer_CoordSystem.cxx @@ -164,6 +164,7 @@ void GLViewer_CoordSystem::fromReference( double& x, double& y ) double eps = 1E-8, pi = 3.14159265; if( r>eps ) + { if( fabs(x)>eps ) { double arg = y/x; @@ -175,6 +176,7 @@ void GLViewer_CoordSystem::fromReference( double& x, double& y ) phi = pi/2.0; else phi = 3*pi/2.0; + } x = r; y = phi-myRotation; diff --git a/src/LightApp/LightApp_Dialog.cxx b/src/LightApp/LightApp_Dialog.cxx index 4c2a16a10..04839bfb7 100644 --- a/src/LightApp/LightApp_Dialog.cxx +++ b/src/LightApp/LightApp_Dialog.cxx @@ -564,6 +564,7 @@ void LightApp_Dialog::onToggled( bool on ) id = anIt.key(); if( id!=-1 ) + { if( on ) { updateButtons( id ); @@ -571,6 +572,7 @@ void LightApp_Dialog::onToggled( bool on ) } else emit objectDeactivated( id ); + } } /*! diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index 9c4858edc..d0c4e2933 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -53,11 +53,11 @@ struct CMapEntry { - CMapEntry(); - ~CMapEntry(); - Colormap cmap; - bool alloc; - XStandardColormap scmap; + CMapEntry(); + ~CMapEntry(); + Colormap cmap; + bool alloc; + XStandardColormap scmap; }; /*! @@ -65,9 +65,9 @@ struct CMapEntry */ CMapEntry::CMapEntry() { - cmap = 0; - alloc = false; - scmap.colormap = 0; + cmap = 0; + alloc = false; + scmap.colormap = 0; } /*! @@ -75,8 +75,8 @@ CMapEntry::CMapEntry() */ CMapEntry::~CMapEntry() { - if ( alloc ) - XFreeColormap( QX11Info::display(), cmap ); + if ( alloc ) + XFreeColormap( QX11Info::display(), cmap ); } static QMultiHash *cmap_dict = 0; @@ -84,13 +84,13 @@ static bool mesa_gl = false; static void cleanup_cmaps() { - if ( !cmap_dict ) - return; - //while (!cmap_dict->isEmpty()) - // cmap_dict->erase(cmap_dict->begin()); - cmap_dict->clear(); - delete cmap_dict; - cmap_dict = 0; + if ( !cmap_dict ) + return; + //while (!cmap_dict->isEmpty()) + // cmap_dict->erase(cmap_dict->begin()); + cmap_dict->clear(); + delete cmap_dict; + cmap_dict = 0; } static Colormap choose_cmap( Display *dpy, XVisualInfo *vi ) @@ -186,7 +186,7 @@ static Colormap choose_cmap( Display *dpy, XVisualInfo *vi ) OCCViewer_ViewPort::OCCViewer_ViewPort( QWidget* parent ) : QWidget( parent ) { - initialize(); + initialize(); } /*! @@ -194,7 +194,7 @@ OCCViewer_ViewPort::OCCViewer_ViewPort( QWidget* parent ) */ OCCViewer_ViewPort::~OCCViewer_ViewPort() { - cleanup(); + cleanup(); } /*! @@ -227,97 +227,98 @@ void OCCViewer_ViewPort::cleanup() void OCCViewer_ViewPort::selectVisualId() { #if !defined WNT - XVisualInfo* pVisualInfo; - if ( QX11Info::display() ) - { - /* Initialization with the default VisualID */ - Visual *v = DefaultVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); - int visualID = XVisualIDFromVisual( v ); + XVisualInfo* pVisualInfo; + if ( QX11Info::display() ) + { + /* Initialization with the default VisualID */ + Visual *v = DefaultVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); + /*int visualID = */XVisualIDFromVisual( v ); + + /* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */ + int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, + GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None }; + + pVisualInfo = ::glXChooseVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ), visualAttr ); + + if ( isVisible() ) + hide(); + + XSetWindowAttributes a; + + a.colormap = choose_cmap( QX11Info::display(), pVisualInfo ); /* find best colormap */ + a.background_pixel = QColormap::instance().pixel( backgroundColor() ); + a.border_pixel = QColormap::instance().pixel( Qt::black ); + Window p = RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); + if ( parentWidget() ) + p = parentWidget()->winId(); + + Window w; + /* + if ( type == Type2D ) // creating simple X window for 2d + { + unsigned long xbackground = + BlackPixel( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); + unsigned long xforeground = + WhitePixel( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); - /* Here we use the settings from Optimizer_ViewInfo::TxglCreateWindow() */ - int visualAttr[] = { GLX_RGBA, GLX_DEPTH_SIZE, 1, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, - GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, None }; + w = XCreateSimpleWindow ( QX11Info::display(), p, x(), y(), width(), + height(), 0, xforeground, xbackground ); + } + else if ( type == Type3D ) + { + w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(), + 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual, + CWBackPixel | CWBorderPixel | CWColormap, &a ); + } + else + return; + */ + w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(), + 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual, + CWBackPixel | CWBorderPixel | CWColormap, &a ); + + Window *cmw; + Window *cmwret; + int count; + if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) ) + { + cmw = new Window[count+1]; + memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count ); + XFree( (char*)cmwret ); + int i; - pVisualInfo = ::glXChooseVisual( QX11Info::display(), DefaultScreen( QX11Info::display() ), visualAttr ); + for ( i = 0; i < count; i++ ) + { + if ( cmw[i] == winId() ) /* replace old window */ + { + cmw[i] = w; + break; + } + } - if ( isVisible() ) - hide(); + if ( i >= count ) /* append new window */ + cmw[count++] = w; + } + else + { + count = 1; + cmw = new Window[count]; + cmw[0] = w; + } - XSetWindowAttributes a; + /* Creating new window (with good VisualID) for this widget */ + create(w); + XSetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), cmw, count ); + delete[] cmw; - a.colormap = choose_cmap( QX11Info::display(), pVisualInfo ); /* find best colormap */ - a.background_pixel = QColormap::instance().pixel( backgroundColor() ); - a.border_pixel = QColormap::instance().pixel( Qt::black ); - Window p = RootWindow( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); - if ( parentWidget() ) - p = parentWidget()->winId(); + if ( isVisible() ) + show(); - Window w; - /* if ( type == Type2D ) // creating simple X window for 2d - { - unsigned long xbackground = - BlackPixel( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); - unsigned long xforeground = - WhitePixel( QX11Info::display(), DefaultScreen( QX11Info::display() ) ); + if ( pVisualInfo ) + XFree( (char *)pVisualInfo ); - w = XCreateSimpleWindow ( QX11Info::display(), p, x(), y(), width(), - height(), 0, xforeground, xbackground ); - } - else if ( type == Type3D ) - { - w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(), - 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual, - CWBackPixel | CWBorderPixel | CWColormap, &a ); - } - else - return;*/ - w = XCreateWindow( QX11Info::display(), p, x(), y(), width(), height(), - 0, pVisualInfo->depth, InputOutput, pVisualInfo->visual, - CWBackPixel | CWBorderPixel | CWColormap, &a ); - - Window *cmw; - Window *cmwret; - int count; - if ( XGetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), &cmwret, &count ) ) - { - cmw = new Window[count+1]; - memcpy( (char*)cmw, (char*)cmwret, sizeof(Window) * count ); - XFree( (char*)cmwret ); - int i; - - for ( i = 0; i < count; i++ ) - { - if ( cmw[i] == winId() ) /* replace old window */ - { - cmw[i] = w; - break; - } - } - - if ( i >= count ) /* append new window */ - cmw[count++] = w; - } - else - { - count = 1; - cmw = new Window[count]; - cmw[0] = w; - } - - /* Creating new window (with good VisualID) for this widget */ - create(w); - XSetWMColormapWindows( QX11Info::display(), topLevelWidget()->winId(), cmw, count ); - delete[] cmw; - - if ( isVisible() ) - show(); - - if ( pVisualInfo ) - { - XFree( (char *)pVisualInfo ); - } - XFlush( QX11Info::display() ); - } + XFlush( QX11Info::display() ); + } #endif } @@ -326,11 +327,11 @@ void OCCViewer_ViewPort::selectVisualId() */ void OCCViewer_ViewPort::setBackgroundColor( const QColor& color ) { - QPalette pal = palette(); - pal.setColor( QPalette::Background, color ); - setPalette( pal ); - repaint(); - emit vpChangeBGColor( color ); + QPalette pal = palette(); + pal.setColor( QPalette::Background, color ); + setPalette( pal ); + repaint(); + emit vpChangeBGColor( color ); } /*! @@ -338,7 +339,7 @@ void OCCViewer_ViewPort::setBackgroundColor( const QColor& color ) */ QColor OCCViewer_ViewPort::backgroundColor() const { - return palette().color( QPalette::Active, QPalette::Background ); + return palette().color( QPalette::Active, QPalette::Background ); } /*! @@ -346,7 +347,7 @@ QColor OCCViewer_ViewPort::backgroundColor() const */ bool OCCViewer_ViewPort::isSketchingEnabled() const { - return myEnableSketching; + return myEnableSketching; } /*! @@ -354,7 +355,7 @@ bool OCCViewer_ViewPort::isSketchingEnabled() const */ void OCCViewer_ViewPort::setSketchingEnabled( bool enable ) { - myEnableSketching = enable; + myEnableSketching = enable; } /*! @@ -363,7 +364,7 @@ void OCCViewer_ViewPort::setSketchingEnabled( bool enable ) */ bool OCCViewer_ViewPort::isTransformEnabled() const { - return myEnableTransform; + return myEnableTransform; } /*! @@ -371,7 +372,7 @@ bool OCCViewer_ViewPort::isTransformEnabled() const */ void OCCViewer_ViewPort::setTransformEnabled( bool enable ) { - myEnableTransform = enable; + myEnableTransform = enable; } /*! @@ -387,7 +388,7 @@ void OCCViewer_ViewPort::mousePressEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) { - emit vpMouseEvent( e ); + emit vpMouseEvent( e ); } /*! @@ -395,7 +396,7 @@ void OCCViewer_ViewPort::mouseMoveEvent( QMouseEvent* e ) */ void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + emit vpMouseEvent( e ); } /*! @@ -403,7 +404,7 @@ void OCCViewer_ViewPort::mouseReleaseEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) { - emit vpMouseEvent( e ); + emit vpMouseEvent( e ); } /*! @@ -411,7 +412,7 @@ void OCCViewer_ViewPort::mouseDoubleClickEvent( QMouseEvent *e ) */ void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + emit vpKeyEvent( e ); } /*! @@ -419,7 +420,7 @@ void OCCViewer_ViewPort::keyPressEvent( QKeyEvent *e ) */ void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e ) { - emit vpKeyEvent( e ); + emit vpKeyEvent( e ); } /*! @@ -427,12 +428,12 @@ void OCCViewer_ViewPort::keyReleaseEvent( QKeyEvent *e ) */ void OCCViewer_ViewPort::paintEvent( QPaintEvent* ) { - if ( myPaintersRedrawing ) - { - QPainter p( this ); - emit vpDrawExternal( &p ); - myPaintersRedrawing = false; - } + if ( myPaintersRedrawing ) + { + QPainter p( this ); + emit vpDrawExternal( &p ); + myPaintersRedrawing = false; + } } /*! @@ -440,8 +441,8 @@ void OCCViewer_ViewPort::paintEvent( QPaintEvent* ) */ void OCCViewer_ViewPort::redrawPainters() { - myPaintersRedrawing = true; - repaint(); + myPaintersRedrawing = true; + repaint(); } /*! @@ -464,14 +465,14 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const */ /*void OCCViewer_ViewPort::onCreatePopup( QPopupMenu* popup ) { - if ( popup ) - { - QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this ); - a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) ); - connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor())); - myPopupActions.append( a ); - a->addTo( popup ); - } + if ( popup ) + { + QtxAction* a = new QtxAction( "", tr( "MEN_VP_CHANGEBGR" ), 0, this ); + a->setStatusTip( tr( "PRP_VP_CHANGEBGR" ) ); + connect( a, SIGNAL( activated() ), SLOT( onChangeBgColor())); + myPopupActions.append( a ); + a->addTo( popup ); + } }*/ /*! @@ -479,14 +480,14 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const */ /*void OCCViewer_ViewPort::onDestroyPopup( QPopupMenu* popup ) { - if ( popup ) - { - for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() ) - a->removeFrom( popup ); - //while (!myPopupActions.isEmpty()) - // delete myPopupActions.takeFirst(); - myPopupActions.clear(); - } + if ( popup ) + { + for ( QtxAction* a = myPopupActions.first(); a; a = myPopupActions.next() ) + a->removeFrom( popup ); + //while (!myPopupActions.isEmpty()) + // delete myPopupActions.takeFirst(); + myPopupActions.clear(); + } }*/ /*! @@ -494,7 +495,7 @@ QPaintEngine* OCCViewer_ViewPort::paintEngine() const */ void OCCViewer_ViewPort::onChangeBgColor() { - QColor selColor = QColorDialog::getColor ( backgroundColor(), this ); - if ( selColor.isValid() ) - setBackgroundColor( selColor ); + QColor selColor = QColorDialog::getColor ( backgroundColor(), this ); + if ( selColor.isValid() ) + setBackgroundColor( selColor ); } diff --git a/src/PyConsole/PyConsole_Editor.cxx b/src/PyConsole/PyConsole_Editor.cxx index d3430ae6c..fae253888 100644 --- a/src/PyConsole/PyConsole_Editor.cxx +++ b/src/PyConsole/PyConsole_Editor.cxx @@ -587,7 +587,7 @@ void PyConsole_Editor::keyPressEvent( QKeyEvent* event ) // check if is pressed bool shftPressed = event->modifiers() & Qt::ShiftModifier; - if ( aKey == Qt::Key_Escape || ctrlPressed && aKey == -1 ) { + if ( aKey == Qt::Key_Escape || ( ctrlPressed && aKey == -1 ) ) { // process + key-binding and key: clear current command myCommandBuffer.truncate( 0 ); myPrompt = READY_PROMPT; diff --git a/src/QDS/QDS_Datum.cxx b/src/QDS/QDS_Datum.cxx index 2a0ab0b13..c38820310 100644 --- a/src/QDS/QDS_Datum.cxx +++ b/src/QDS/QDS_Datum.cxx @@ -1298,7 +1298,7 @@ QValidator* QDS_Datum::validator( const bool limits ) const bool QDS_Datum::validate( const QString& txt ) const { if ( type() == DDS_DicItem::Unknown || - type() == DDS_DicItem::String && isDoubleFormat( format() ) ) + ( type() == DDS_DicItem::String && isDoubleFormat( format() ) ) ) return true; QValidator* aValidator = validator( true ); diff --git a/src/Qtx/Qtx.cxx b/src/Qtx/Qtx.cxx index a095db966..be27d4238 100755 --- a/src/Qtx/Qtx.cxx +++ b/src/Qtx/Qtx.cxx @@ -828,7 +828,7 @@ QPixmap Qtx::scaleIcon( const QPixmap& icon, const unsigned w, const unsigned h { QPixmap p; int aw = w, ah = h <= 0 ? w : h; - if ( icon.isNull() || aw <= 0 || ah <= 0 || aw == icon.width() && ah == icon.height() ) + if ( icon.isNull() || aw <= 0 || ah <= 0 || ( aw == icon.width() && ah == icon.height() ) ) p = icon; else p = icon.fromImage( icon.toImage().scaled( aw, ah, Qt::KeepAspectRatio, Qt::SmoothTransformation ) ); @@ -1289,7 +1289,7 @@ bool Qtx::stringToRadialGradient( const QString& str, QRadialGradient& gradient { bool success = false; QStringList vals = str.split( "|", QString::SkipEmptyParts ); - if ( vals.count() > 5 && vals[0] == "radial" || vals[0] == "rg" ) + if ( ( vals.count() > 5 && vals[0] == "radial" ) || vals[0] == "rg" ) { // center, radius and focal point double cx, cy, r, fx, fy; @@ -1343,7 +1343,7 @@ bool Qtx::stringToConicalGradient( const QString& str, QConicalGradient& gradien { bool success = false; QStringList vals = str.split( "|", QString::SkipEmptyParts ); - if ( vals.count() > 3 && vals[0] == "conical" || vals[0] == "cg" ) + if ( ( vals.count() > 3 && vals[0] == "conical" ) || vals[0] == "cg" ) { // center and angle double cx, cy, a; @@ -1450,7 +1450,7 @@ void* Qtx::getDisplay() */ Qt::HANDLE Qtx::getVisual() { - Qt::HANDLE res = NULL; + Qt::HANDLE res = (Qt::HANDLE)NULL; Display* pDisplay = (Display*)getDisplay(); if ( !pDisplay ) diff --git a/src/Qtx/QtxActionMenuMgr.cxx b/src/Qtx/QtxActionMenuMgr.cxx index ea20d0d20..1f849aaf7 100644 --- a/src/Qtx/QtxActionMenuMgr.cxx +++ b/src/Qtx/QtxActionMenuMgr.cxx @@ -1175,7 +1175,7 @@ void QtxActionMenuMgr::setEmptyEnabled( const int id, const bool enable ) if ( node && menuAction( id ) ) { int old = node->emptyEnabled; node->emptyEnabled += enable ? 1 : -1; - if ( old <= 0 && enable || old > 0 && !enable ) // update menu only if enabled state has been changed + if ( ( old <= 0 && enable ) || ( old > 0 && !enable ) ) // update menu only if enabled state has been changed updateMenu( node, true, true ); } } diff --git a/src/Qtx/QtxSearchTool.cxx b/src/Qtx/QtxSearchTool.cxx index 743407527..5dd7afca9 100644 --- a/src/Qtx/QtxSearchTool.cxx +++ b/src/Qtx/QtxSearchTool.cxx @@ -1038,8 +1038,8 @@ void QtxSearchTool::updateShortcuts() ShortcutList::Iterator it; for ( it = myShortcuts.begin(), i = 0; it != myShortcuts.end(); ++it, i++ ) { - (*it)->setEnabled( isEnabled() && ( i < 3 && myActivators & StandardKey || - i > 2 && myActivators & HotKey ) ); + (*it)->setEnabled( isEnabled() && ( ( i < 3 && myActivators & StandardKey ) || + ( i > 2 && myActivators & HotKey ) ) ); } } diff --git a/src/SUIT/SUIT_FileDlg.cxx b/src/SUIT/SUIT_FileDlg.cxx index 958f6165e..955b01cd1 100755 --- a/src/SUIT/SUIT_FileDlg.cxx +++ b/src/SUIT/SUIT_FileDlg.cxx @@ -669,9 +669,9 @@ void SUIT_FileDlg::addQuickDir() if ( dirList.count() > 0 ) { for ( int i = 0; i < dirList.count() && !found; i++ ) { QDir aDir( dirList[i] ); - if ( aDir.canonicalPath().isNull() && dirList[i] == dir.absolutePath() || - !aDir.canonicalPath().isNull() && aDir.exists() && - aDir.canonicalPath() == dir.canonicalPath() ) { + if ( ( aDir.canonicalPath().isNull() && dirList[i] == dir.absolutePath() ) || + ( !aDir.canonicalPath().isNull() && aDir.exists() && + aDir.canonicalPath() == dir.canonicalPath() ) ) { found = true; } } diff --git a/src/SUIT/SUIT_MessageBox.cxx b/src/SUIT/SUIT_MessageBox.cxx index 6f69c2507..66c62bbfb 100755 --- a/src/SUIT/SUIT_MessageBox.cxx +++ b/src/SUIT/SUIT_MessageBox.cxx @@ -968,9 +968,9 @@ int SUIT_MessageBox::messageBox( Icon icon, QWidget* parent, QPushButton* pb = msgBox.addButton( txt, role ); bm.insert( pb, btn ); - if ( defaultButton == -1 && i == 0 || btn == defaultButton ) + if ( ( defaultButton == -1 && i == 0 ) || btn == defaultButton ) msgBox.setDefaultButton( pb ); - if ( escapeButton == -1 && i == lst.count() - 1 || btn == escapeButton ) + if ( ( escapeButton == -1 && i == lst.count() - 1 ) || btn == escapeButton ) msgBox.setEscapeButton( pb ); } diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index fc102935b..5d2ce2fa8 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -519,7 +519,7 @@ SALOME_Actor if(myIsPreselected){ const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex(); int anExtent = aMapIndex.Extent(); - anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1)); + anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ TColStd_IndexedMapOfInteger aMapIndex; aMapIndex.Add( anObjId ); @@ -548,7 +548,7 @@ SALOME_Actor if(myIsPreselected){ const TColStd_IndexedMapOfInteger& aMapIndex = myPreHighlightActor->GetMapIndex(); int anExtent = aMapIndex.Extent(); - anIsChanged |= (anExtent == 0 || anExtent > 0 && anObjId != aMapIndex(1)); + anIsChanged |= (anExtent == 0 || (anExtent > 0 && anObjId != aMapIndex(1))); if(anIsChanged){ TColStd_IndexedMapOfInteger aMapIndex; aMapIndex.Add( anObjId ); diff --git a/src/SVTK/SVTK_Trihedron.cxx b/src/SVTK/SVTK_Trihedron.cxx index 827800cd8..1b81d896e 100644 --- a/src/SVTK/SVTK_Trihedron.cxx +++ b/src/SVTK/SVTK_Trihedron.cxx @@ -53,6 +53,7 @@ SVTK_Trihedron int aCount = 0; while(vtkActor* aProp = aCollection->GetNextActor()) { if(aProp->GetVisibility()) + { if(SALOME_Actor* anActor = SALOME_Actor::SafeDownCast(aProp)) { if(!anActor->IsInfinitive()) aCount++; @@ -60,6 +61,7 @@ SVTK_Trihedron else if ( !OwnActor( aProp ) ) { aCount++; } + } } return aCount; } diff --git a/src/SVTK/SVTK_ViewModel.cxx b/src/SVTK/SVTK_ViewModel.cxx index 4bdc295f5..8f7218963 100644 --- a/src/SVTK/SVTK_ViewModel.cxx +++ b/src/SVTK/SVTK_ViewModel.cxx @@ -518,7 +518,7 @@ void SVTK_Viewer::Erase( const SALOME_VTKPrs* prs, const bool forced ) if(vtkActorCollection* anActorCollection = aPrs->GetObjects()){ // get SALOMEDS Study // Temporarily commented to avoid awful dependecy on SALOMEDS - // TODO: better mechanism of storing display/erse status in a study + // TODO: better mechanism of storing display/erase status in a study // should be provided... //_PTR(Study) aStudy(getStudyDS()); anActorCollection->InitTraversal(); @@ -526,7 +526,7 @@ void SVTK_Viewer::Erase( const SALOME_VTKPrs* prs, const bool forced ) if(SALOME_Actor* anAct = SALOME_Actor::SafeDownCast(anActor)){ // Set visibility flag // Temporarily commented to avoid awful dependecy on SALOMEDS - // TODO: better mechanism of storing display/erse status in a study + // TODO: better mechanism of storing display/erase status in a study // should be provided... //Handle(SALOME_InteractiveObject) anObj = anAct->getIO(); //if(!anObj.IsNull() && anObj->hasEntry() && aStudy){ @@ -537,10 +537,12 @@ void SVTK_Viewer::Erase( const SALOME_VTKPrs* prs, const bool forced ) for(int i = 0, iEnd = aViews.size(); i < iEnd; i++){ if(SVTK_ViewWindow* aViewWindow = dynamic_cast(aViews.at(i))) if(SVTK_View* aView = aViewWindow->getView()) + { if ( forced ) aView->Remove(anAct,false); else aView->Erase(anAct,forced); + } } } } diff --git a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx index 983999c73..10dc12288 100644 --- a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx +++ b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx @@ -149,7 +149,7 @@ SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent) setWindowTitle(tr("TLT_STUDY_PROPERTIES")); setSizeGripEnabled( true ); - setWindowFlags( windowFlags() ^ QFlags(!Qt::WindowContextHelpButtonHint) ); + setWindowFlags( windowFlags() ^ QFlags(windowFlags() & ~(Qt::WindowContextHelpButtonHint) ) ); QGridLayout* mainLayout = new QGridLayout(this); mainLayout->setMargin(DEFAULT_MARGIN); diff --git a/src/Style/Style_Salome.cxx b/src/Style/Style_Salome.cxx index 3df8e7f66..7d25eb93e 100644 --- a/src/Style/Style_Salome.cxx +++ b/src/Style/Style_Salome.cxx @@ -625,7 +625,7 @@ void Style_Salome::drawComplexControl( ComplexControl cc, const QStyleOptionComp menuArea = subControlRect(cc, toolbutton, SC_ToolButtonMenu, w); if (w && ( qobject_cast(w->parentWidget() ) || - toolbutton->state & State_AutoRaise && !( toolbutton->state & State_MouseOver ) ) + ( toolbutton->state & State_AutoRaise && !( toolbutton->state & State_MouseOver ) ) ) ) { QWindowsStyle::drawComplexControl( cc, opt, p, w ); return; diff --git a/src/VTKViewer/VTKViewer_GeometryFilter.cxx b/src/VTKViewer/VTKViewer_GeometryFilter.cxx index 42aecc0c0..061810ead 100755 --- a/src/VTKViewer/VTKViewer_GeometryFilter.cxx +++ b/src/VTKViewer/VTKViewer_GeometryFilter.cxx @@ -223,7 +223,7 @@ VTKViewer_GeometryFilter cellId++) { cellVis[cellId] = 1; - if ( this->CellClipping && cellId < this->CellMinimum || + if ( ( this->CellClipping && cellId < this->CellMinimum ) || cellId > this->CellMaximum ) { cellVis[cellId] = 0; @@ -233,12 +233,12 @@ VTKViewer_GeometryFilter for (i=0; i < npts; i++) { x = p->GetPoint(pts[i]); - if ( (this->PointClipping && (pts[i] < this->PointMinimum || - pts[i] > this->PointMaximum) ) || - (this->ExtentClipping && - (x[0] < this->Extent[0] || x[0] > this->Extent[1] || - x[1] < this->Extent[2] || x[1] > this->Extent[3] || - x[2] < this->Extent[4] || x[2] > this->Extent[5] )) ) + if ( ( ( ( this->PointClipping && (pts[i] < this->PointMinimum ) ) || + pts[i] > this->PointMaximum) ) || + ( this->ExtentClipping && + ( x[0] < this->Extent[0] || x[0] > this->Extent[1] || + x[1] < this->Extent[2] || x[1] > this->Extent[3] || + x[2] < this->Extent[4] || x[2] > this->Extent[5] )) ) { cellVis[cellId] = 0; break; diff --git a/src/VTKViewer/VTKViewer_MarkerWidget.cxx b/src/VTKViewer/VTKViewer_MarkerWidget.cxx index 4e59c0fdd..0bb9aef9f 100644 --- a/src/VTKViewer/VTKViewer_MarkerWidget.cxx +++ b/src/VTKViewer/VTKViewer_MarkerWidget.cxx @@ -160,7 +160,7 @@ VTK::MarkerMap VTKViewer_MarkerWidget::getCustomMarkerMap() void VTKViewer_MarkerWidget::setStandardMarker( VTK::MarkerType theMarkerType, VTK::MarkerScale theMarkerScale ) { - if ( theMarkerType > VTK::MT_NONE && theMarkerType < VTK::MT_USER || + if ( ( theMarkerType > VTK::MT_NONE && theMarkerType < VTK::MT_USER ) || myExtraMarkerList.contains( theMarkerType ) ) { myTypeGroup->button( 0 )->setChecked( true ); myWGStack->setCurrentIndex( 0 ); -- 2.39.2