From: sbh Date: Thu, 10 Apr 2014 14:07:40 +0000 (+0400) Subject: Code analysis & compiller warnings removed: X-Git-Tag: V_0.1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b7011cae1f70044f0c62726b1a1733c3fbde30b8;p=modules%2Fshaper.git Code analysis & compiller warnings removed: * XGUI_ViewWindow, XGUI_ViewPort uninitialized variables in constructor * PyConsole_EnhEditor signed/unsigned comparsion * XGUI_Module virtual destructor added --- diff --git a/src/PyConsole/PyConsole_EnhEditor.cxx b/src/PyConsole/PyConsole_EnhEditor.cxx index 2dd8207ab..d5c47dff3 100644 --- a/src/PyConsole/PyConsole_EnhEditor.cxx +++ b/src/PyConsole/PyConsole_EnhEditor.cxx @@ -342,7 +342,7 @@ void PyConsole_EnhEditor::extractCommon(const std::vector & matches, QS if (charIdx >= matches[0].size()) return; QChar ch = matches[0][charIdx]; - for (int j = 1; j < matches.size(); j++) + for (size_t j = 1; j < matches.size(); j++) if (charIdx >= matches[j].size() || matches[j][charIdx] != ch) return; result += ch; diff --git a/src/XGUI/XGUI_Module.h b/src/XGUI/XGUI_Module.h index 1860462e2..374e057ea 100644 --- a/src/XGUI/XGUI_Module.h +++ b/src/XGUI/XGUI_Module.h @@ -10,6 +10,8 @@ class XGUI_Module public: virtual void createFeatures() = 0; virtual void featureCreated(XGUI_Command*) = 0; + + virtual ~XGUI_Module() {}; }; //! This function must return a new module instance. diff --git a/src/XGUI/XGUI_ViewPort.cpp b/src/XGUI/XGUI_ViewPort.cpp index 4398cabaa..21552a55d 100644 --- a/src/XGUI/XGUI_ViewPort.cpp +++ b/src/XGUI/XGUI_ViewPort.cpp @@ -249,10 +249,15 @@ void OpenGLUtils_FrameBuffer::unbind() //************************************************************************ //************************************************************************ //************************************************************************ -XGUI_ViewPort::XGUI_ViewPort(XGUI_ViewWindow* theParent, const Handle(V3d_Viewer)& theViewer, +XGUI_ViewPort::XGUI_ViewPort(XGUI_ViewWindow* theParent, + const Handle(V3d_Viewer)& theViewer, V3d_TypeOfView theType) - : QWidget(theParent), myPaintersRedrawing(false), myScale(1.0), myIsAdvancedZoomingEnabled( - false) + : QWidget(theParent), + myPaintersRedrawing(false), + myScale(1.0), + myIsAdvancedZoomingEnabled(false), + myBgImgHeight(0), + myBgImgWidth(0) { setMouseTracking(true); setBackgroundRole(QPalette::NoRole); diff --git a/src/XGUI/XGUI_ViewWindow.cpp b/src/XGUI/XGUI_ViewWindow.cpp index f68ca95c3..fd8f1dc9e 100644 --- a/src/XGUI/XGUI_ViewWindow.cpp +++ b/src/XGUI/XGUI_ViewWindow.cpp @@ -133,7 +133,10 @@ XGUI_ViewWindow::XGUI_ViewWindow(XGUI_Viewer* theViewer, V3d_TypeOfView theType) myCurrPointType(XGUI::GRAVITY), myPrevPointType(XGUI::GRAVITY), myRotationPointSelection(false), - myClosable(true) + myClosable(true), + myStartX(0), myStartY(0), myCurrX(0), myCurrY(0), myCurScale(0.0), myCurSketch(0), + myDrawRect(false), myEnableDrawMode(false), myCursorIsHand(false), myEventStarted(false), + myLastState(NormalState), myOperation(NOTHING) { mySelectedPoint = gp_Pnt(0., 0., 0.); setFrameStyle(QFrame::Raised);