From 2b02659010bf6ea1fa70e628a8b8ec3bfcc7aea8 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Wed, 29 May 2019 14:40:01 -0400 Subject: [PATCH] Misc. typo and whitespace fixes Found via `codespell` --- CMakeLists.txt | 4 ++-- src/Gui/Application.h | 12 ++++++------ src/Gui/View3DInventorViewer.cpp | 2 +- src/Main/CMakeLists.txt | 12 ++++++------ src/Mod/AddonManager/addonmanager_utilities.py | 2 +- src/Mod/Fem/feminout/convert2TetGen.py | 2 +- src/Mod/PartDesign/App/FeatureHole.cpp | 3 +-- src/Mod/PartDesign/Gui/Command.cpp | 2 +- src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp | 12 ++++++------ 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b42fe795c2..a3f53c0298 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,7 +222,7 @@ if(MSVC) # Create install commands for dependencies for INSTALL target in FreeCAD solution option(FREECAD_INSTALL_DEPEND_DIRS "Create install dependency commands for the INSTALL target found in the FreeCAD solution." ON) - # Copy libpack smaller dependency folders to build folder per user request - if non-existant at destination + # Copy libpack smaller dependency folders to build folder per user request - if non-existent at destination if (NOT EXISTS ${CMAKE_BINARY_DIR}/bin/imageformats/qsvg.dll) option(FREECAD_COPY_DEPEND_DIRS_TO_BUILD "Copy smaller libpack dependency directories to build directory." OFF) endif() @@ -1211,7 +1211,7 @@ if(MSVC) if(FREECAD_RELEASE_SEH) set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /EHa") endif(FREECAD_RELEASE_SEH) - + option(FREECAD_USE_MP_COMPILE_FLAG "Add /MP flag to the compiler definitions. Speeds up the compile on multi processor machines" OFF) if(FREECAD_USE_MP_COMPILE_FLAG) # set "Build with Multiple Processes" diff --git a/src/Gui/Application.h b/src/Gui/Application.h index 7d121d96b1..b63cf1fa11 100644 --- a/src/Gui/Application.h +++ b/src/Gui/Application.h @@ -46,10 +46,10 @@ class ViewProvider; class ViewProviderDocumentObject; /** The Application main class - * This is the central class of the GUI + * This is the central class of the GUI * @author Jürgen Riegel, Werner Mayer */ -class GuiExport Application +class GuiExport Application { public: /// construction @@ -166,7 +166,7 @@ public: Gui::ViewProvider* getViewProvider(const App::DocumentObject*) const; //@} - /// true when the application shuting down + /// true when the application shutting down bool isClosing(void); void checkForPreviousCrashes(); @@ -205,7 +205,7 @@ public: public: //--------------------------------------------------------------------- - // python exports goes here +++++++++++++++++++++++++++++++++++++++++++ + // python exports goes here +++++++++++++++++++++++++++++++++++++++++++ //--------------------------------------------------------------------- // static python wrapper of the exported functions static PyObject* sActivateWorkbenchHandler (PyObject *self,PyObject *args); // activates a workbench object @@ -258,11 +258,11 @@ public: static PyObject* sCreateViewer (PyObject *self,PyObject *args); static PyObject* sGetMarkerIndex (PyObject *self,PyObject *args); - + static PyObject* sAddDocObserver (PyObject *self,PyObject *args); static PyObject* sRemoveDocObserver (PyObject *self,PyObject *args); - static PyMethodDef Methods[]; + static PyMethodDef Methods[]; private: struct ApplicationP* d; diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index 61add44527..b28184e0cb 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -484,7 +484,7 @@ void View3DInventorViewer::init() this->getSoRenderManager()->setGLRenderAction(new SoBoxSelectionRenderAction); this->getSoRenderManager()->getGLRenderAction()->setCacheContext(id); - // set the transperency and antialiasing settings + // set the transparency and antialiasing settings // getGLRenderAction()->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_BLEND); getSoRenderManager()->getGLRenderAction()->setTransparencyType(SoGLRenderAction::SORTED_OBJECT_SORTED_TRIANGLE_BLEND); // getGLRenderAction()->setSmoothing(true); diff --git a/src/Main/CMakeLists.txt b/src/Main/CMakeLists.txt index 846e1ae0d3..489bab1fe5 100644 --- a/src/Main/CMakeLists.txt +++ b/src/Main/CMakeLists.txt @@ -43,7 +43,7 @@ if(BUILD_GUI) target_link_libraries(FreeCADMain ${FreeCAD_LIBS}) if(NOT BUILD_DYNAMIC_LINK_PYTHON) - # executeables have to be linked against python libraries, + # executables have to be linked against python libraries, # because extension modules are not. target_link_libraries(FreeCADMain ${PYTHON_LIBRARIES}) endif(NOT BUILD_DYNAMIC_LINK_PYTHON) @@ -61,7 +61,7 @@ if(BUILD_GUI) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else() - INSTALL(TARGETS FreeCADMain + INSTALL(TARGETS FreeCADMain RUNTIME DESTINATION bin ) endif() @@ -89,12 +89,12 @@ else() ) endif() -target_link_libraries(FreeCADMainCmd +target_link_libraries(FreeCADMainCmd ${FreeCADMainCmd_LIBS} ) if(NOT BUILD_DYNAMIC_LINK_PYTHON) - # executeables have to be linked against python libraries, + # executables have to be linked against python libraries, # because extension modules are not. target_link_libraries(FreeCADMainCmd ${PYTHON_LIBRARIES}) endif(NOT BUILD_DYNAMIC_LINK_PYTHON) @@ -112,7 +112,7 @@ elseif(APPLE AND NOT BUILD_WITH_CONDA) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ) else() - INSTALL(TARGETS FreeCADMainCmd + INSTALL(TARGETS FreeCADMainCmd RUNTIME DESTINATION bin ) endif() @@ -160,7 +160,7 @@ if(BUILD_GUI) set_target_properties(FreeCADGuiPy PROPERTIES PDB_NAME_DEBUG "FreeCADGuiPy_d") set_target_properties(FreeCADGuiPy PROPERTIES PDB_NAME_RELEASE "FreeCADGuiPy") endif(WIN32) - + if(WIN32) INSTALL(TARGETS FreeCADGuiPy RUNTIME DESTINATION bin diff --git a/src/Mod/AddonManager/addonmanager_utilities.py b/src/Mod/AddonManager/addonmanager_utilities.py index 14a6d5a579..c3f76a7b56 100644 --- a/src/Mod/AddonManager/addonmanager_utilities.py +++ b/src/Mod/AddonManager/addonmanager_utilities.py @@ -9,7 +9,7 @@ else: from PySide import QtGui -# Qt tanslation handling +# Qt translation handling try: _encoding = QtGui.QApplication.UnicodeUTF8 def translate(context, text, disambig=None): diff --git a/src/Mod/Fem/feminout/convert2TetGen.py b/src/Mod/Fem/feminout/convert2TetGen.py index 52d9735248..208fcc29dc 100644 --- a/src/Mod/Fem/feminout/convert2TetGen.py +++ b/src/Mod/Fem/feminout/convert2TetGen.py @@ -75,7 +75,7 @@ def exportMeshToTetGenPoly(meshToExport, filePath, beVerbose=1): EdgeFacets = {(PointList[0], PointList[1]): set([0])} Edge = [] - # Finde all facets for each edge + # Find all facets for each edge for FacetIndex in range(len(allFacets)): Facet = allFacets[FacetIndex] for i in range(0, -len(Facet), -1): diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 1155a5f4e0..d6afbff035 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -561,7 +561,7 @@ void Hole::updateDiameterParam() pitch = ThreadPitch.getValue(); } - /* Use thread tap diameter, normall D - pitch */ + /* Use thread tap diameter, normal D - pitch */ diameter = diameter - pitch; } else { @@ -1294,4 +1294,3 @@ App::DocumentObjectExecReturn *Hole::execute(void) return new App::DocumentObjectExecReturn(e.what()); } } - diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 850f57ea73..5e12d95da4 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -598,7 +598,7 @@ void CmdPartDesignNewSketch::activated(int iMsg) unsigned validPlaneCount = 0; - // Baseplanes are preaprooved + // Baseplanes are preapproved try { for ( auto plane: pcActiveBody->getOrigin ()->planes() ) { planes.push_back (plane); diff --git a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp index 3c681e1504..c29be1c023 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderShapeBinder.cpp @@ -59,13 +59,13 @@ ViewProviderShapeBinder::ViewProviderShapeBinder() PointSize.setStatus(App::Property::Hidden, true); DisplayMode.setStatus(App::Property::Hidden, true); - //get the datum coloring sheme + //get the datum coloring scheme // set default color for datums (golden yellow with 60% transparency) ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath ( "User parameter:BaseApp/Preferences/Mod/PartDesign"); unsigned long shcol = hGrp->GetUnsigned ( "DefaultDatumColor", 0xFFD70099 ); App::Color col ( (uint32_t) shcol ); - + ShapeColor.setValue(col); LineColor.setValue(col); PointColor.setValue(col); @@ -80,7 +80,7 @@ ViewProviderShapeBinder::~ViewProviderShapeBinder() bool ViewProviderShapeBinder::setEdit(int ModNum) { // TODO Share code with other view providers (2015-09-11, Fat-Zer) - + if (ModNum == ViewProvider::Default || ModNum == 1) { // When double-clicking on the item for this pad the // object unsets and sets its edit mode without closing @@ -118,7 +118,7 @@ bool ViewProviderShapeBinder::setEdit(int ModNum) { } void ViewProviderShapeBinder::unsetEdit(int ModNum) { - + PartGui::ViewProviderPart::unsetEdit(ModNum); } @@ -171,14 +171,14 @@ void ViewProviderShapeBinder::highlightReferences(const bool on, bool /*auxiliar if (!subs.empty() && !originalLineColors.empty()) { svp->LineColorArray.setValues(originalLineColors); originalLineColors.clear(); - + svp->DiffuseColor.setValues(originalFaceColors); originalFaceColors.clear(); } } } -void ViewProviderShapeBinder::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) +void ViewProviderShapeBinder::setupContextMenu(QMenu* menu, QObject* receiver, const char* member) { QAction* act; act = menu->addAction(QObject::tr("Edit shape binder"), receiver, member);