diff --git a/src/Base/Parameter.cpp b/src/Base/Parameter.cpp index 7eaa80de39..b17f2001f6 100644 --- a/src/Base/Parameter.cpp +++ b/src/Base/Parameter.cpp @@ -1450,18 +1450,3 @@ bool DOMPrintErrorHandler::handleError(const DOMError &domError) // Instructs the serializer to continue serialization if possible. return true; } - - -//************************************************************************** -//************************************************************************** -// XMLCh -//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - -static const XMLCh element_person[]= { - chLatin_p, chLatin_e, chLatin_r, chLatin_s, chLatin_o, chLatin_n, chNull -}; - -static const XMLCh element_link[]= { - chLatin_l, chLatin_i, chLatin_n, chLatin_k, chNull -}; diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 18fca7a496..9e690237a7 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1387,6 +1387,9 @@ void messageHandler(QtMsgType type, const char *msg) case QtWarningMsg: Base::Console().Warning("%s\n", msg); break; + case QtCriticalMsg: + Base::Console().Error("%s\n", msg); + break; case QtFatalMsg: Base::Console().Error("%s\n", msg); abort(); // deliberately core dump diff --git a/src/Gui/PythonConsolePy.cpp b/src/Gui/PythonConsolePy.cpp index 918e3d0ee1..63419026c8 100644 --- a/src/Gui/PythonConsolePy.cpp +++ b/src/Gui/PythonConsolePy.cpp @@ -328,7 +328,6 @@ void PythonStdin::init_type() PythonStdin::PythonStdin(PythonConsole *pc) : pyConsole(pc) { - console = getMainWindow()->findChild(); } PythonStdin::~PythonStdin() @@ -345,5 +344,5 @@ Py::Object PythonStdin::repr() Py::Object PythonStdin::readline(const Py::Tuple& args) { - return Py::String( (const char *)console->readline().toAscii() ); + return Py::String( (const char *)pyConsole->readline().toAscii() ); } diff --git a/src/Gui/PythonConsolePy.h b/src/Gui/PythonConsolePy.h index 64b46e8e57..bab86f0d2b 100644 --- a/src/Gui/PythonConsolePy.h +++ b/src/Gui/PythonConsolePy.h @@ -142,9 +142,6 @@ public: Py::Object repr(); Py::Object readline(const Py::Tuple&); - -private: - PythonConsole* console; }; } // namespace Gui diff --git a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp index ae13f46809..5ce63faf62 100644 --- a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp +++ b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp @@ -200,7 +200,6 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type) SoType perspectivetype = SoPerspectiveCamera::getClassTypeId(); - SoType orthotype = SoOrthographicCamera::getClassTypeId(); SbBool oldisperspective = getSoRenderManager()->getCamera()->getTypeId().isDerivedFrom(perspectivetype); SbBool newisperspective = type.isDerivedFrom(perspectivetype); @@ -226,7 +225,6 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type) getSoEventManager()->setCamera(newcamera); //if the superscene has a camera we need to replace it too - SoCamera* camera = NULL; SoSeparator* superscene = (SoSeparator*) getSoRenderManager()->getSceneGraph(); SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); diff --git a/src/Gui/SoFCUnifiedSelection.cpp b/src/Gui/SoFCUnifiedSelection.cpp index ef7346e419..335f7e054e 100644 --- a/src/Gui/SoFCUnifiedSelection.cpp +++ b/src/Gui/SoFCUnifiedSelection.cpp @@ -638,7 +638,7 @@ void SoSelectionElementAction::initClass() SO_ACTION_ADD_METHOD(SoPointSet,callDoAction); } -SoSelectionElementAction::SoSelectionElementAction (Type t) : _type(t), _select(FALSE), _det(0) +SoSelectionElementAction::SoSelectionElementAction (Type t) : _type(t), _det(0) { SO_ACTION_CONSTRUCTOR(SoSelectionElementAction); } diff --git a/src/Gui/SoFCUnifiedSelection.h b/src/Gui/SoFCUnifiedSelection.h index 1a9374e67d..445a6a3e68 100644 --- a/src/Gui/SoFCUnifiedSelection.h +++ b/src/Gui/SoFCUnifiedSelection.h @@ -173,7 +173,6 @@ private: private: Type _type; - SbBool _select; SbColor _color; const SoDetail* _det; }; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 1b511efba4..8504760ef0 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -1201,7 +1201,6 @@ void View3DInventorViewer::setRenderFramebuffer(const SbBool enable) } else if(!this->framebuffer) { const SbViewportRegion vp = this->getSoRenderManager()->getViewportRegion(); - SbVec2s origin = vp.getViewportOriginPixels(); SbVec2s size = vp.getViewportSizePixels(); static_cast(this->viewport())->makeCurrent(); @@ -2385,7 +2384,7 @@ void View3DInventorViewer::drawArrow(void) } // ************************************************************************ - +#if 0 #define HAND_WITH 24 #define HAND_HEIGHT 24 #define HAND_HOT_X 9 @@ -2429,7 +2428,7 @@ static unsigned char cross_mask_bitmap[] = { 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03, 0xc0, 0x03 }; - +#endif // Set cursor graphics according to mode. void View3DInventorViewer::setCursorRepresentation(int modearg) { diff --git a/src/Mod/Fem/App/FemMeshPyImp.cpp b/src/Mod/Fem/App/FemMeshPyImp.cpp index 8fee8ccbe2..c41577b49a 100755 --- a/src/Mod/Fem/App/FemMeshPyImp.cpp +++ b/src/Mod/Fem/App/FemMeshPyImp.cpp @@ -273,7 +273,6 @@ PyObject* FemMeshPy::addFace(PyObject *args) PyObject *obj; int ElementId=-1; - float min_eps = 1.0e-2f; if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) { Py::List list(obj); @@ -364,7 +363,6 @@ PyObject* FemMeshPy::addVolume(PyObject *args) PyObject *obj; int ElementId=-1; - float min_eps = 1.0e-2f; if (PyArg_ParseTuple(args, "O!|i", &PyList_Type, &obj, &ElementId)) { Py::List list(obj); diff --git a/src/Mod/Fem/App/FemMeshShapeObject.cpp b/src/Mod/Fem/App/FemMeshShapeObject.cpp index 4c3457e43b..e8d6b65a89 100644 --- a/src/Mod/Fem/App/FemMeshShapeObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeObject.cpp @@ -202,19 +202,19 @@ App::DocumentObjectExecReturn *FemMeshShapeObject::execute(void) #endif - - SMESHDS_Mesh* data = const_cast(newMesh.getSMesh())->GetMeshDS(); - const SMDS_MeshInfo& info = data->GetMeshInfo(); - int numNode = info.NbNodes(); - int numTria = info.NbTriangles(); - int numQuad = info.NbQuadrangles(); - int numPoly = info.NbPolygons(); - int numVolu = info.NbVolumes(); - int numTetr = info.NbTetras(); - int numHexa = info.NbHexas(); - int numPyrd = info.NbPyramids(); - int numPris = info.NbPrisms(); - int numHedr = info.NbPolyhedrons(); + + //SMESHDS_Mesh* data = const_cast(newMesh.getSMesh())->GetMeshDS(); + //const SMDS_MeshInfo& info = data->GetMeshInfo(); + //int numNode = info.NbNodes(); + //int numTria = info.NbTriangles(); + //int numQuad = info.NbQuadrangles(); + //int numPoly = info.NbPolygons(); + //int numVolu = info.NbVolumes(); + //int numTetr = info.NbTetras(); + //int numHexa = info.NbHexas(); + //int numPyrd = info.NbPyramids(); + //int numPris = info.NbPrisms(); + //int numHedr = info.NbPolyhedrons(); // set the value to the object FemMesh.setValue(newMesh); diff --git a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp index 1850339f8c..5211b18fb2 100755 --- a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp @@ -463,7 +463,6 @@ void ViewProviderFemMesh::setHighlightNodes(const std::set& HighlightedNod { if(HighlightedNodes.size()){ - const Fem::PropertyFemMesh* mesh = &(dynamic_cast(this->pcObject)->FemMesh); SMESHDS_Mesh* data = const_cast((dynamic_cast(this->pcObject)->FemMesh).getValue().getSMesh())->GetMeshDS(); pcAnoCoords->point.setNum(HighlightedNodes.size()); @@ -713,16 +712,16 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, SoCoordin Base::Console().Log("Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n"); const SMDS_MeshInfo& info = data->GetMeshInfo(); - int numNode = info.NbNodes(); + //int numNode = info.NbNodes(); int numTria = info.NbTriangles(); int numQuad = info.NbQuadrangles(); int numPoly = info.NbPolygons(); - int numVolu = info.NbVolumes(); + //int numVolu = info.NbVolumes(); int numTetr = info.NbTetras(); int numHexa = info.NbHexas(); int numPyrd = info.NbPyramids(); int numPris = info.NbPrisms(); - int numHedr = info.NbPolyhedrons(); + //int numHedr = info.NbPolyhedrons(); bool ShowFaces = false; diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index 346ea5159f..75f12c4af0 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -2064,7 +2064,6 @@ bool MeshOutput::SaveVRML (std::ostream &rstrOut) const return false; Base::BoundBox3f clBB = _rclMesh.GetBoundBox(); - Base::Vector3f clCenter = clBB.CalcCenter(); Base::SequencerLauncher seq("Saving VRML file...", _rclMesh.CountPoints() + _rclMesh.CountFacets()); diff --git a/src/Mod/Mesh/App/Core/Trim.cpp b/src/Mod/Mesh/App/Core/Trim.cpp index 1079682569..b509c96b2e 100644 --- a/src/Mod/Mesh/App/Core/Trim.cpp +++ b/src/Mod/Mesh/App/Core/Trim.cpp @@ -618,10 +618,6 @@ bool MeshTrimming::CreateFacets(unsigned long ulFacetPos, int iSide, const std:: MeshGeomFacet clFac; - Base::Vector3f pnt = myMesh._aclPointArray[facet._aulPoints[1]]; - Base::Vector3f dir = myMesh._aclPointArray[facet._aulPoints[2]] - - myMesh._aclPointArray[facet._aulPoints[1]]; - float fDistEdgeP1 = clP1.DistanceToLineSegment( myMesh._aclPointArray[facet._aulPoints[1]], myMesh._aclPointArray[facet._aulPoints[2]]).Length(); diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index d4b6af2add..03648c5da0 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -127,7 +127,7 @@ void PartExport initPart() } else { Base::Console().Error("Can not inherit Part.OCCError form BaseFreeCADError.\n"); - PyObject* OCCError = PyErr_NewException("Part.OCCError", + OCCError = PyErr_NewException("Part.OCCError", PyExc_RuntimeError, NULL); } Py_INCREF(OCCError); diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index c36ae81d67..99db840441 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -2055,8 +2055,6 @@ TopoDS_Shape TopoShape::mirror(const gp_Ax2& ax2) const { gp_Trsf mat; mat.SetMirror(ax2); - TopLoc_Location loc = this->_Shape.Location(); - gp_Trsf placement = loc.Transformation(); BRepBuilderAPI_Transform mkTrf(this->_Shape, mat); return mkTrf.Shape(); } diff --git a/src/Mod/PartDesign/Gui/CMakeLists.txt b/src/Mod/PartDesign/Gui/CMakeLists.txt index e83b8dffa2..15fc66dd81 100644 --- a/src/Mod/PartDesign/Gui/CMakeLists.txt +++ b/src/Mod/PartDesign/Gui/CMakeLists.txt @@ -27,7 +27,6 @@ set(PartDesignGui_LIBS set(PartDesignGui_MOC_HDRS FeaturePickDialog.h - ReferenceSelection.h TaskPadParameters.h TaskPocketParameters.h TaskChamferParameters.h diff --git a/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp b/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp index 7f615f5482..cfc6b266c8 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp +++ b/src/Mod/Sketcher/Gui/TaskSketcherConstrains.cpp @@ -127,7 +127,7 @@ void ConstraintView::contextMenuEvent (QContextMenuEvent* event) CONTEXT_ITEM("Sketcher_SelectElementsAssociatedWithConstraints","Select Elements","Sketcher_SelectElementsAssociatedWithConstraints",doSelectConstraints,true) - QAction* sep = menu.addSeparator(); + menu.addSeparator(); QAction* change = menu.addAction(tr("Change value"), this, SLOT(modifyCurrentItem())); QVariant v = item ? item->data(Qt::UserRole) : QVariant(); diff --git a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h index 732601dd51..8c5ba41a04 100644 --- a/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h +++ b/src/Mod/Sketcher/Gui/TaskSketcherCreateCommands.h @@ -58,8 +58,7 @@ protected: private: - QWidget* proxy; - + //QWidget* proxy; }; } //namespace TaskView diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index 0def8d44b9..8030a593b1 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -157,7 +157,7 @@ struct EditData { CurvesMaterials(0), PointsCoordinate(0), CurvesCoordinate(0), - CurveSet(0), EditCurveSet(0), RootCrossSet(0), + CurveSet(0), RootCrossSet(0), EditCurveSet(0), PointSet(0), pickStyleAxes(0) {} @@ -809,7 +809,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe //Create the Context Menu using the Main View Qt Widget QMenu contextMenu(viewer->getGLWidget()); Gui::MenuManager::getInstance()->setupContextMenu(geom, contextMenu); - QAction *used = contextMenu.exec(QCursor::pos()); + contextMenu.exec(QCursor::pos()); return true; } @@ -870,7 +870,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe //Create the Context Menu using the Main View Qt Widget QMenu contextMenu(viewer->getGLWidget()); Gui::MenuManager::getInstance()->setupContextMenu(geom, contextMenu); - QAction *used = contextMenu.exec(QCursor::pos()); + contextMenu.exec(QCursor::pos()); return true; } @@ -1543,10 +1543,8 @@ bool ViewProviderSketch::detectPreselection(const SoPickedPoint *Point, //Base::Console().Log("Point pick\n"); SoPath *path = Point->getPath(); SoNode *tail = path->getTail(); - SoNode *tailFather = path->getNode(path->getLength()-2); SoNode *tailFather2 = path->getNode(path->getLength()-3); - // checking for a hit in the points if (tail == edit->PointSet) { const SoDetail *point_detail = Point->getDetail(edit->PointSet); @@ -1944,7 +1942,7 @@ void ViewProviderSketch::updateColor(void) SbColor *crosscolor = edit->RootCrossMaterials->diffuseColor.startEditing(); SbVec3f *verts = edit->CurvesCoordinate->point.startEditing(); - int32_t *index = edit->CurveSet->numVertices.startEditing(); + //int32_t *index = edit->CurveSet->numVertices.startEditing(); // colors of the point set if (edit->FullyConstrained) @@ -1962,11 +1960,11 @@ void ViewProviderSketch::updateColor(void) for (std::set::iterator it=edit->SelPointSet.begin(); it != edit->SelPointSet.end(); it++) pcolor[*it] = (*it==(edit->PreselectPoint + 1) && (edit->PreselectPoint != -1))? - PreselectSelectedColor:SelectColor; + PreselectSelectedColor:SelectColor; // colors of the curves - int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1; - int extGeoCount = getSketchObject()->getExternalGeometryCount(); + //int intGeoCount = getSketchObject()->getHighestCurveIndex() + 1; + //int extGeoCount = getSketchObject()->getExternalGeometryCount(); float x,y,z; @@ -1974,65 +1972,62 @@ void ViewProviderSketch::updateColor(void) for (int i=0; i < CurvNum; i++) { int GeoId = edit->CurvIdToGeoId[i]; - // CurvId has several vertex a ssociated to 1 material - //edit->CurveSet->numVertices => [i] indicates number of vertex for line i. - int indexes=(edit->CurveSet->numVertices[i]); - - bool selected=(edit->SelCurvSet.find(GeoId) != edit->SelCurvSet.end()); - bool preselected=(edit->PreselectCurve == GeoId); - - if (selected && preselected){ + // CurvId has several vertex a ssociated to 1 material + //edit->CurveSet->numVertices => [i] indicates number of vertex for line i. + int indexes=(edit->CurveSet->numVertices[i]); + + bool selected=(edit->SelCurvSet.find(GeoId) != edit->SelCurvSet.end()); + bool preselected=(edit->PreselectCurve == GeoId); + + if (selected && preselected){ color[i] = PreselectSelectedColor; - for(int k=j; jgetGeometry(GeoId)->Construction) - { + for(int k=j; jgetGeometry(GeoId)->Construction) { color[i] = CurveDraftColor; - for(int k=j; jFullyConstrained) - { + for(int k=j; jFullyConstrained) { color[i] = FullyConstrainedColor; - for(int k=j; j